version: '3' tasks: requirements: desc: install required packages cmds: - | sudo apt install --no-install-recommends --assume-yes \ autoconf \ automake \ build-essential \ coreutils \ curl \ pass \ libcurl4-openssl-dev \ libtool \ python3-virtualenv \ python3-dev venv: desc: install a Python3 virtualenv and all the required ansible / molecule dependencies. cmds: - | rm -rf ./.venv || true python3 -m virtualenv --download ./.venv ./.venv/bin/python3 -m pip install --upgrade -r requirements.txt status: - test -d ./.venv ansible: desc: create or update an ansible.cfg file cmds: - ./scripts/generate_ansible_config.sh -o ansible.cfg status: - test -f ansible.cfg galaxy: desc: install ansible galaxy collections cmds: - "{{.PYTHON_WRAPPER}} ansible-galaxy collection install -r ansible_galaxy-requirements.yml" dev: desc: install required packages to run molecule, vagrant and other dev tools cmds: - ./scripts/setup_dev_env.sh preconditions: - sh: test -f ./.venv/bin/python3 msg: virtualenv must be set up first - sh: test -x /usr/sbin/nft msg: "nftables is required (tested bin path: /usr/sbin/nft)"