Skip to content

Instantly share code, notes, and snippets.

@jpetazzo
Created September 26, 2013 22:06
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jpetazzo/6721252 to your computer and use it in GitHub Desktop.
Save jpetazzo/6721252 to your computer and use it in GitHub Desktop.
Ansible-in-Dockerfile
FROM ubuntu
RUN sed -i 's/main/main universe multiverse/' /etc/apt/sources.list
RUN apt-get update -q
RUN apt-get install -qy build-essential python-dev python-pip curl
#RUN apt-get install -qy autoconf
RUN pip install ansible
RUN mkdir -p /etc/ansible
RUN curl -L https://github.com/gc3-uzh-ch/ansible-playbooks/archive/cloud.tar.gz | tar -zxf-
RUN /bin/echo -e "[slurm_master]\nlocalhost" > /etc/ansible/hosts
RUN cp /bin/true /bin/hostname
RUN cd ansible-playbooks-cloud && ansible-playbook site.yml -c local
@quicksnap
Copy link

Have you had a good experience provisioning Docker with Ansible? I'm looking into using Ansible like this--wondering if you ran into any issues.

@dghubble
Copy link

I'm assuming local provisioning like this stumbles if you reboot in one of your playbooks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment