Public Repository

Last pushed: 2 years ago
Short Description
Easily set up and use ansible configs for different clusters
Full Description

All you need to get started is a list of IPs in your cluster, plus a couple of initial bootstrap pre-requisites:

  • All nodes must initially have the same root password
  • All nodes must allow ssh login via password

You can change those two things later, but in order to do the initial setup this is required.


  1. Create a new directory for a cluster
  2. Create a file in that directory with the IP addresses of each node called 'ansible_hosts'. (This is an Ansible inventory file, you can use its normal syntax, but at the very least it needs one IP address per line.)
  3. Pass this directory in to the container..
    • docker run -it --rm --net host -v ${PWD}/my_new_cluster:/ansible bnaylor/ansible

This will:

  • Give you a working ansible env. without installing anything locally
  • Initialize the container volume directory for future runs
  • Create a new ssh key for management of this cluster
  • Scan all the hosts in the cluster to build a known_hosts file
  • Distribute your new public key to the hosts
    • It will nuke the existing authorized_keys file
  • Repopulate host caches each time the container is restarted

You can copy new playbooks into <cluster_dir>/playbooks at any time.

Docker Pull Command