| Variable | Default Value | Usage |
|---|---|---|
| PIP_REQUIREMENTS | requirements.txt | install python library requirements |
| ANSIBLE_REQUIREMENTS | requirements.yml | install ansible galaxy roles requirements |
| DEPLOY_KEY | pass an SSH private key to use in container | |
| CA_CERT_UPGRADE | set to true to update ca-certificates package |
To enable mitogen, add this configuration into defaults in ansible.cfg file (adjust the Python version path if using a custom Alpine base):
[defaults]
strategy_plugins = /usr/lib/python3.14/site-packages/ansible_mitogen/plugins/strategy
strategy = mitogen_linearFull documentation : https://mitogen.networkgenomics.com/ansible_detailed.html
docker run -it --rm \
-v ${PWD}:/ansible \
pad92/ansible-alpine:latest \
ansible-playbook -i inventory playbook.ymldocker run -it --rm \
-v ${PWD}:/ansible \
pad92/ansible-alpine:latest \
ansible-galaxy init role-namedocker run -it --rm \
-v ${PWD}:/ansible \
pad92/ansible-alpine:latest \
ansible-lint tests/playbook.ymldocker run -it --rm \
-v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \
-v ${PWD}:/ansible \
-e SSH_AUTH_SOCK=/ssh-agent \
pad92/ansible-alpine:latest \
shdocker run -it --rm \
-v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \
-v ${PWD}:/ansible \
-v ${PWD}/ca-certificates:/usr/local/share/ca-certificates \
-e SSH_AUTH_SOCK=/ssh-agent \
pad92/ansible-alpine:latest shA Makefile is provided to build and run the test suite locally, matching the steps and variables configured in .gitlab-ci.yml.
To build the Docker image locally and load it directly into your local Docker daemon storage (no registry push):
make buildTo run all tests (Ansible functional checks, Mitogen imports, and Trivy security scans):
make testNote: The Trivy scan mounts your host's /var/run/docker.sock to scan the locally built image without pulling it, and persists its database to ./trivy-cache.
You can also run specific test jobs individually:
make test-ansible # Run ansible and ansible-lint checks
make test-mitogen # Run mitogen import verification
make test-trivy # Run Trivy vulnerability scanTo remove the local Trivy cache database and clean up buildx configurations:
make clean