No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

DevOpsDays Singapore 2016 Ansible Workshop Preparation


While the workshop should be informative and useful if you can't run Ansible on the day, being able to try commands as we go along will likely aid memory and allow more interaction.

If the instructions below aren't clear, please raise an Issue (or better still a Pull Request) against thse instructions.


  • One control node - this can be your laptop if you're running OS X or Linux. The control node should have the following installed:
    • ansible 2.1
    • git
  • One target node - this should probably be a fresh VM on your laptop. The accompanying playbooks will run best against Fedora/CentOS/RHEL etc. but require minor tweaks for Debian/Ubuntu etc. The target host should have a local account that you can ssh as without password using SSH keys, and that acount should be able to sudo as root without password.

Easy setup

This is intended for people who are running windows or who want a simple way to create the necessary VMs.

Ensure hardware virtualization is enabled

For Windows/Linux on 64 bit CPUs (32 bit CPUs are not supported in this doc at this point, improvement suggestions welcomed)

Most Apple Macs have hardware virtualization on by default, so no action should be required.

Install Virtualbox and vagrant

OS X, Windows
Fedora, Ubuntu etc.

Download the workshop resources

Download and extract:

Create VMs

From the workshop resources directory (on Windows, Shift+Right Click on a folder will give you an option to open a command prompt in that directory), run:

cd vagrant
vagrant up --provision target
vagrant up --provision control
vagrant reload --provision target

on the command line. (The order here allows the control node to get its ssh key onto the target, before turning off password access on the target node again)


If you see:

The box 'centos/7' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: [""]

you may need to install Visual C++ runtime (see

Check that first VM can control second VM

On windows, if you don't already have a command-line ssh client, download and install git from When installing, ensure that the 'Git Bash here' option is ticked.

From the workshop resources directory (use Shift + Right click to get Git Bash here on the folder in windows), run:

vagrant ssh control

From the control node, run:

ansible -m ping target
ansible -m command -a whoami -b target

Self installation

On your control node:

cd workingdir
git clone
cd devops-singapore-2016/ansible
echo > inventory/target << EOF
target ansible_host=$TARGET ansible_user=$USER

Then the following should work

ansible -m ping target
ansible -m command -a whoami -b target