From b9e102953564b0e7d1ae0fbed9ae35b600d5ec1b Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Fri, 13 Feb 2026 13:52:44 +0000 Subject: T8267: Extend the vyos-build repo to include Ansible install phony Extend the vyos-build repo to include Ansible install PHONY Add the ability to install Ansible and VyOS compatible modules. It could be used for the further "topology tests". It also could be helpful with environment questions where a bug was reproduced. Use virtual environment to install Ansible + VyOS modules New options: - make ansible-install - make ansible-check - make ansible-clean --- scripts/ansible-install | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/ansible-install (limited to 'scripts') diff --git a/scripts/ansible-install b/scripts/ansible-install new file mode 100755 index 00000000..22f467ff --- /dev/null +++ b/scripts/ansible-install @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euo pipefail + +VENV_DIR=${1:-.venv} + +echo "==> Creating Python venv at $VENV_DIR" +python3 -m venv "$VENV_DIR" +. "$VENV_DIR/bin/activate" + +echo "==> Upgrading pip, setuptools, wheel" +pip install --upgrade pip setuptools wheel + +echo "==> Installing Ansible and dependencies" +pip install ansible-core==2.18.2 ansible-pylibssh + +echo "==> Installing VyOS Ansible collection" +ansible-galaxy collection install git+https://github.com/vyos/vyos.vyos.git,main + +echo "Ansible setup complete. Activate with: source $VENV_DIR/bin/activate" -- cgit v1.2.3