Public | Automated Build

Last pushed: 2 years ago
Short Description
Ubuntu 14.04 LTS with ansible
Full Description


Ansible no longer maintains images in Dockerhub directly. There are
several Ansible images on Dockerhub that are maintained by members of
the Ansible community, which you can find with the following search:

Community Maintained Ansible Images

Old Summary

These are base docker images that include ansible. Ansible maintains these
images so that people can easily build docker images using ansible playbooks.

The images in this repository use ubuntu14.04 as their base. If you'd rather base
your image on centos7 , please see:

Supported tags and respective Dockerfile links

devel and latest point to an image built with a recent checkout of ansible's
development branch.

stable is built with the latest ansible release on pypi.

The $major.$minor tags are useful if you have to use a specific older version
of the images for some reason. Note that we do not build new versions of these
older images. We only build for versions that correspond to the devel and
stable tags.

Building your Docker images with an ansible playbook

A simple example of using this to build a Docker image using a playbook can be found in the source repository:

Rebuilding automatically when the ansible image updates

If you are using a docker hub automated build to build your images you can set
your image to rebuild whenever the base ansible image is updated:

  1. Go to the docker hub page for your repository.
  2. In the sidebar labeled Settings, find the entry marked "Repository Links"
  3. On the Repository Links page, enter the ansible repository you are layering
    your image on top of. For instance, if you are using the
    ubuntu14.04-ansible repository, enter ansible/ubuntu14.04-ansible
    into the "Repository Name" box and click "add".
  4. Docker hub will now automatically rebuild your image whenever that ansible
    repository has a new build.
Docker Pull Command
Source Repository

Comments (6)
2 years ago

Please bump build, stable image still contains 1.9.0 while current ppa repo versions is 1.9.1.

2 years ago

Hi, I think 1.8 tag image contains the devel version of ansible.

vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run ansible/ubuntu14.04-ansible:1.8 ansible-playbook --version
ansible-playbook 1.9 (devel 53a3644ecd) last updated 2015/01/23 18:46:25 (GMT +000)
  lib/ansible/modules/core: (detached HEAD 670098af2d) last updated 2015/01/23 18:46:39 (GMT +000)
  lib/ansible/modules/extras: (detached HEAD 21126a4af3) last updated 2015/01/23 18:46:41 (GMT +000)
  v2/ansible/modules/core: (detached HEAD 670098af2d) last updated 2015/01/23 18:46:43 (GMT +000)
  v2/ansible/modules/extras: (detached HEAD 21126a4af3) last updated 2015/01/23 18:46:46 (GMT +000)
  configured module search path = /opt/ansible/ansible/library

Also, 1.7 tag image contains version 1.8.2.

vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run ansible/ubuntu14.04-ansible:1.7 ansible-playbook --version
ansible-playbook 1.8.2
  configured module search path = None
2 years ago

Does make sense to make volume at ~/.ansinble/tmp?

2 years ago

Oops, I didn't see these comments here. I believe I fixed this a couple months ago. It does work now -- I just tested that ansible/ubuntu14.04-ansible:latest works.

3 years ago

I just came across the same :
ERROR: apt is not a legal parameter in an Ansible task or handler

When I ansible --version inside the Dockerfile I get :

ansible 1.8 (devel e6fcd90342) last updated 2014/10/01 17:38:42 (GMT +000)
  lib/ansible/modules/core:  not found - use git submodule update --init lib/ansible/modules/core
  lib/ansible/modules/extras:  not found - use git submodule update --init lib/ansible/modules/extras
  configured module search path = /opt/ansible/ansible/library
3 years ago

Hmm - When I try this, ansible complains about (in my case) the apt module not being found. It looks like the default module directory doesn't actually exist? It's even in the Dockerfile as /opt/ansible/ansible/library.