Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 438 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 438 Bytes

ansible-local

This is an example of how to test an Ansible playbook locally (without any remote host) using a Debian Docker container.

docker build -t img-debian-ansible - << 'EOF'
FROM docker.io/library/debian:12
RUN apt-get update && \
    apt-get install -y ansible && \
    rm -rf /var/lib/apt/lists/*
VOLUME /v
WORKDIR /v
EOF

docker run -it --rm -v "$PWD:/v" img-debian-ansible ansible-playbook playbook.yml