Public | Automated Build

Last pushed: a year ago
Short Description
The Ansible IT automation tools in a container.
Full Description

docker-ansible

Image to make the Ansible tools available in a container.

Warning: this is not a standalone image !

I wanted to be able to run several version of Ansible without having to maintain too many images. Therefore, when you run this image, you need to mount the ansible code as a volume. See the usage section for examples.

usage

# get the ansible code
# checkout the branch you want to use
git clone git://github.com/ansible/ansible.git --recursive ~/tools/ansible
git checkout devel
git submodule update --init --recursive

ansible_path="${HOME}/tools/ansible"

# ansible
docker run \
  --name ansible \
  --rm \
  --volume ${ansible_path}:/ansible \
  pamplemousse/ansible \
  ansible

# ansible-playbook
# run from your project folder to mount it as a volume
docker run \
  --name ansible-playbook \
  -it --rm \
  --volume ${ansible_path}:/ansible \
  --volume $(pwd):/home/ansible/project \
  -w /home/ansible/project \
  pamplemousse/ansible \
  ansible-playbook

# ansible-galaxy
# run from your project folder to mount it as a volume
docker run \
  --name ansible-galaxy \
  --rm \
  --volume ${ansible_path}:/ansible \
  --volume $(pwd):/home/ansible/project
  -w /home/ansible/project \
  pamplemousse/ansible \
  ansible-galaxy
Docker Pull Command
Owner
pamplemousse
Source Repository

Comments (0)