Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evilfreelancer/docker-ansible
Collection of Ansible tools inside Docker container
https://github.com/evilfreelancer/docker-ansible
ansible debian docker
Last synced: about 1 month ago
JSON representation
Collection of Ansible tools inside Docker container
- Host: GitHub
- URL: https://github.com/evilfreelancer/docker-ansible
- Owner: EvilFreelancer
- License: mit
- Created: 2018-02-27T20:05:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T20:47:40.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T20:07:59.487Z (3 months ago)
- Topics: ansible, debian, docker
- Language: Shell
- Homepage: https://hub.docker.com/r/evilfreelancer/docker-ansible
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Ansible
Small universal image of Docker with Ansible tools for easy software deploy.
## About folders
* `ansible` : `/opt/ansible` - Required by Ansible files for work
* `scripts` : `/opt/scripts` - Collection of scripts for running via entrypoint of Docker## How to build
git clone https://github.com/EvilFreelancer/docker-ansible.git
cd docker-ansible
docker build . --tag ansible## Okay, what next?
You need put your Ansible playbook and any other files which required
for normal work into the `ansible` folder. On build stage this folder
will be added into the container's `/opt` folder.Next you need write some script (eg `run.sh`), which contain some
commands, for example:```bash
#!/bin/bashcd /opt/ansible/
ansible-playbook -i hosts site.yml
```## How to run
That's easy, as any other Docker containers:
docker run ansible run.sh
Where:
* ansible - is tag's name of our image
* run.sh - script name which should be executedIf you need demonized container, try this:
docker run ansible
And container never stop, until you will not stop him (eg via `docker kill`).
## Small hack
In theory `docker run ansible *.sh` also must work, this command mean
what container should execute all files from `/opt/scripts` folder
with `.sh` suffix of filename.Check the `entrypoint.sh` and you will get why.
# Links
* http://docs.ansible.com/ansible/latest/intro_installation.html
* https://www.ansible.com/overview/how-ansible-works
* https://hub.docker.com/r/evilfreelancer/docker-ansible/