AVD container with Ansible AVD and Ansible AVD collections installed
Breaking change in avd3.3.3_cvp3.3.1_debian and later
- the default collection path
/home/avd/.ansible/collections/ansible_collections
will be used to install collections in the container. collections_paths
must be default and must NOT be set explicitly in theansible.cfg
avd-all-in-one
is a close replica of avd-base
container. The major difference is that Ansible AVD and Ansible CVP collections are pre-installed and container is ready to use.
For details, check avd-base container documentation. This readme only includes essential how-to instructions to avoid double maintenance.
ansible.cfg
in AVD inventory repository must have following settings for avd-all-in-one container to work correctly: collections_paths = /home/avd/ansible-cvp:/home/avd/ansible-avd:/home/avd/.ansible/collections/ansible_collections
If you have to override that for development purposes, mount ansible-avd or ansible-cvp repositories from your machine to /home/avd/ansible-cvp
or /home/avd/ansible-avd
manually or using similar settings in vscode.json
:
"mounts": [
"source=${localWorkspaceFolder}/../ansible-avd,target=/home/avd/ansible-avd,type=bind,consistency=cached,readonly=true"
],
ansible.cfg
in AVD inventory repository must use the default collection path. collections_paths
must NOT be set explicitly.
If you have to override that for development purposes, mount ansible-avd or ansible-cvp repositories from your machine to /home/avd/.ansible/collections/ansible_collections/arista/avd
and /home/avd/.ansible/collections/ansible_collections/arista/cvp
"mounts": [
"source=${localWorkspaceFolder}/../ansible-avd,target=/home/avd/.ansible/collections/ansible_collections/arista/avd,type=bind,consistency=cached,readonly=true"
],
In case of concerns, check your ansible environment with ansible-galaxy collection list
.
Execute following command to run the avd-all-in-one container manually:
docker run --rm -it -v $(pwd):/home/avd/projects/ avdteam/avd-all-in-one
Type exit
to leave the container environment.
Create .devcontainer
directory in your AVD inventory repository. Create devcontainer.json
inside this directory.
Use following devcontainer.json
to start:
Unfortunately devcontainer.json
is not yet supported with VScode Remote-SSH plugin. You can track recent development here.
The easiest way to use avd-all-in-one container with remote SSH is creating a simple alias: alias avd="sudo docker run --rm -it -v $(pwd):/home/avd/projects/ avdteam/avd-all-in-one"
-v ${pwd}/:/home/avd/projects
in docker run
command may not work as expected in MacOS or some Linux distributions. Use -v $(pwd)/:/home/avd/projects
instead.
On a Linux system incorrect permissions set on an AVD inventory repository can break execution of Ansible commands inside the AVD container.