# ansible-navigator ## run playbooks with execution environment 1. set up venv ``` python -m venv kvant-venv source kvant-venv/bin/activate kvant-venv/bin/python -m pip install --upgrade pip pip install -r requirements.txt ``` 2. run playbooks with custom execution environment ``` ansible-navigator run --eei kvant-ee ``` ## add dependencies 1. set up venv ``` python -m venv kvant-venv source kvant-venv/bin/activate kvant-venv/bin/python -m pip install --upgrade pip ``` 2. pip packages run `pip install x` to add packages in the vnenv. then run `pip freeze > requirements.txt` to capture current state. 3. ansible modules add to `collection-requirements.yml` file/ 4. binaries add to `ansible-ee/bindep.txt` 5. build execution environment ``` cd ansible-ee TMPDIR=/srv/builder/ansible-builder ansible-builder build -t kvant-ee --no-cache ``` if the `context` dir already exists locally from previous builds, it is possible to alternatively use podman directly e.g. ``` TMPDIR=/srv/builder/ansible-builder podman build -f context/Containerfile -t kvant-ee context ``` ## build new execution environment 1. set up venv ``` python -m venv kvant-venv source kvant-venv/bin/activate kvant-venv/bin/python -m pip install --upgrade pip pip install -r requirements.txt ``` 2. build execution environment ``` cd ansible-ee TMPDIR=/srv/builder/ansible-builder ansible-builder build -t kvant-ee --no-cache ``` 3. run playbooks with custom execution environment ``` ansible-navigator run --eei kvant-ee ```