Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


Place your playbooks in playbooks folder
The demo project contains sample proxies to ansible, ansible-playbook, ansible-vault.

For more complex operations you can login into container, playbooks are placed in /playbooks folder

Quick start

  • Clone the repo: git clone && cd docker-ansible
  • Change private key permissions after cloning: chmod 400 sshkey.pem
  • Place some playbook into ./playbooks folder (or use demo playbook, just change the hosts file, it installs docker on remote machine)

  • Copy ansible, ansible-vault, ansible-playbook from playbooks/demo into your playbook root folder

  • Run ./start , it should pull the image and start the coontainer.
  • Now you can enter playbooks/your_playbook and execute commands. Also you can login into the container and execute all the ansible commands from inside.

Full Setup

  • clone the repo and cd inside
  • change private/public key for your own:
    1. rm sshkey* ./
    2. ssh-keygen -t rsa -f sshkey
    3. mv sshkey sshkey.pem
    4. chmod 400 sshkey.pem
  • Replace image name in ./build & ./start from lalala/ansible to your own
    find ./ -type f -exec sed -i -e 's/lalala\/ansible/SOMEUSER\/SOMEIMAGE/g' {} \;
  • Replace container name from ansible_cont to your own
  • find ./ -type f -exec sed -i -e 's/ansible_cont/MY_CONT_NAME/g' {} \;
  • Rebuild the image: ./build
  • Start the container ./start


  • ./build - builds an image
  • ./start - starts the container
  • ./login - log into the container
  • ./ - starts the demo playbook
  • ./playbooks/demo/ansible-* - proxies to original ansible commands from inside the container. if you want to work from outside - copy this files into your playbook's root.
Docker Pull Command
Source Repository