Public | Automated Build

Last pushed: 7 months ago
Short Description
Simple docker image for running Ansible in a container.
Full Description

Ansible

Simple docker image for running Ansible in a container. Most distributions ship old versions of the ansible packages. Containerizing Ansible allows much newer versions to be used without hacking around with ppa's.

Usage

The image assumes the current directory will be mounted at /usr/src/app inside the container, and expects at least 1 argument:

  • the ansible command to run (ansible-playbook, ansible-vault, etc)

For example, to run the playbook site.yml with the inventory file
inventory.yml in the current directory:

$ docker run \
    --rm -it \
    -v $(pwd):/usr/src/app \
    --name ansible \
    jdubz/ansible \
    ansible -h

An example bash function that wraps the entire command, allowing the user to simply execute ansible and run the entire build process in a container automatically, can be found here.

Docker Pull Command
Owner
jdubz
Source Repository

Comments (0)