Skip to content

Instantly share code, notes, and snippets.

@jwhb
Created October 7, 2018 11:55
Show Gist options
  • Save jwhb/074b0b650437cac9b8fcb8d186531fef to your computer and use it in GitHub Desktop.
Save jwhb/074b0b650437cac9b8fcb8d186531fef to your computer and use it in GitHub Desktop.
Run Ansible via Docker
#!/bin/sh
# start ansible container with working directory mounted as /ansible
# then run ping on targets from inventory file
docker run --rm -v $(pwd):/ansible -it webdevops/ansible:alpine ansible -m ping -i /ansible/inventory all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment