Sign inSign up

lanycrost/ansible

By lanycrost

Updated almost 8 years ago

Containers with preinstalled Ansible.

Image
0

1.3K

lanycrost/ansible repository overview

Containers with preinstalled Ansible.

Build Status Docker Pulls Docker Stars Docker
Layers

Important Note: This images built for testing in an isolated environment—not for production—and the settings and configuration used may not be suitable for a secure and performant production environment. Use on production servers/in the wild at your own risk!

Ansible and Docker

How to Build

This images is built on Docker Hub automatically any time the upstream distro containers is rebuilt, and any time a commit is made or merged to the master branch. But if you need to build the images on your own locally, do the following:

  1. Install Docker.
  2. cd into distro directory.
  3. Run docker build .

How to Use

  1. Install Docker.
  2. Pull this image from Docker Hub: docker pull lanycrost/ansible:latest (or use the image you built earlier, e.g. ansible:ubuntu-14).
  3. Run a container from the image: docker run --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro lanycrost/ansible:latest (to test my Ansible roles, I add in a volume mounted from the current working directory with --volume=`pwd`:/etc/ansible/roles/role_under_test:ro).
  4. Use Ansible inside the container: a. docker exec --tty [container_id] env TERM=xterm ansible --version b. docker exec --tty [container_id] env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml --syntax-check

Authors

References

Tag summary

Content type

Image

Digest

Size

120.1 MB

Last updated

almost 8 years ago

docker pull lanycrost/ansible