Skip to content

This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts.

License

Notifications You must be signed in to change notification settings

Peco602/ansible-linux-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Push Mentioned in awesome-docker

Ansible Linux Docker image

This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts.

Build the image

docker build -t ansible-linux-docker:latest .

Run the container

Mount the ansible folder containing:

  • ansible.cfg: Ansible default configuration
  • hosts: Hosts inventory
  • playbook.yml: Ansible playbook

and execute the ansible-playbook command:

docker run --rm -v $PWD/ansible:/etc/ansible ansible-linux-docker:latest ansible-playbook /etc/ansible/playbook.yml -i /etc/ansible/hosts

Mount the ansible folder and run the container interactively:

docker run --rm -v $PWD/ansible:/etc/ansible -ti ansible-linux-docker:latest bash

DockerHub

Authors

About

This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts.

Topics

Resources

License

Stars

Watchers

Forks