Minimal Docker image with
- python 3.1x
- ansible 2.17 (10.x)
- ansible-lint
- mitogen
- ansible-cmdb (shamelessly using @dirks’s fork with python 3.12+ support)
Considering the example
folder
project
├── Makefile
├── facts
│ ├── logs
│ │ ├── log_files
│ │ └── …
│ ├── host_facts
│ └── …
├── playbook
┊ ├── roles
│ ├── role_1
│ ├── role_2
│ └── …
├── .gitignore
├── ansible.cfg
├── hosts.ini
└── main.yml
Then this command will run your Playbook, in check mode by default, in a new container
docker run -it --rm -v ./playbook:/playbook -v ./facts:/facts -v $SSH_AUTH_SOCK:/run/ssh-agent \
bergalath/ansible-full:2.17-5 ansible-playbook ./main.yml --check --diff
Yeah, it’s a bit tedious, so take a look at this minimal Makefile
Happy Ansiblin’ with mitogen speed !
Another image, bergalath/ansible-full:2.16, is availabe with
- python 3.12
- ansible 2.16 (9.7.0)
- ansible-lint
- mitogen
- ansible-cmdb (shamelessly using @dirks’s fork with python 3.12 support)