https://github.com/Peco602/ansible-linux-docker
This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts.
https://github.com/Peco602/ansible-linux-docker
ansible ansible-playbook container docker
Last synced: 25 days ago
JSON representation
This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts.
- Host: GitHub
- URL: https://github.com/Peco602/ansible-linux-docker
- Owner: Peco602
- License: mit
- Created: 2022-06-30T07:53:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-21T09:34:02.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T09:54:42.509Z (6 months ago)
- Topics: ansible, ansible-playbook, container, docker
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 22
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-docker - Ansible Linux Docker - Run Ansible from a Linux container. By [@Peco602][peco602] (Container Operations / Orchestration)
- awesome-docker - Ansible Linux Docker - Run Ansible from a Linux container. By [@Peco602][peco602] (Container Operations / Orchestration)
- awesome-docker - Ansible Linux Docker - Run Ansible from a Linux container. By [@Peco602][peco602] (Container Operations / Orchestration)
- awesome-starred - Peco602/ansible-linux-docker - This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts. (Shell)
- awesome-starred - Peco602/ansible-linux-docker - This Docker image allows to run Ansible from a Linux container. It supports Linux, Windows and MacOS target hosts. (Shell)
README


[](https://github.com/veggiemonk/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
```bash
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 playbookand execute the `ansible-playbook` command:
```bash
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:
```bash
docker run --rm -v $PWD/ansible:/etc/ansible -ti ansible-linux-docker:latest bash
```## DockerHub
- [peco602/ansible-linux-docker](https://hub.docker.com/r/peco602/ansible-linux-docker)
## Authors
- [Giovanni Pecoraro](https://www.peco602.com/)