Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags
This branch is 1475 commits behind ome:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

OME Infrastructure

Tools, scripts and other systems infrastructure used to support the work of the OME

Build Status

OME Ansible repository

This playbook uses Ansible 2.0 features (which is still in development), do not use pip install ansible. See for full installation instructions.


  • Create a virtualenv:

      virtualenv venvs/ansible
  • Clone ansible and submodules:

      git clone git:// --recursive
  • Install dependencies listed in

      venvs/ansible/bin/pip install paramiko jinja2 PyYAML pycrypto six
  • Clone this repository:

      git clone
  • Clone the repository containing the inventory, host and group vars files. Ansible will automatically look for host_vars and group_vars directories in the parent directory of the inventory file.

Running the development ansible

  • Activate the virtualenv:

      source venvs/ansible/bin/activate
  • Activate the Ansible development environment:

      source ansible/hacking/env-setup -q

All ansible tools should now be in your path.

Alternatively adjust the paths in this script as necessary:

source ~/venvs/ansible/bin/activate
source ~/github/ansible/hacking/env-setup -q
exec "$(basename $0)" "$@"

And copy/symlink it into a directory on your PATH as ansible, ansible-playbook, etc (the script should automatically run the ansible command corresponding to it's file name).

As another alternative you can probably install ansible into your virtualenv (untested):

    venvs/ansible/bin/python install --help


In the following examples replace example-hosts with the private host inventory file

Dry-run ci-provision.yml for all hosts listed in ci-provision.yml:

  • -u Login as this user
  • -b use sudo
  • --ask-become-pass prompt for sudo password
  • -C Dry-run mode
  • -v Verbose (repeat to increase verbosity)

Note this may fail since some tasks are dependent on others being completed:

ansible-playbook -i example-hosts -u $USERNAME -b --ask-become-pass -C -v ci-provision.yml

Run provision.yml:

ansible-playbook -i example-hosts -u $USERNAME -b --ask-become-pass ci-provision.yml

Run provision.yml for all subset of the hosts or groups listed in provision.yml:

ansible-playbook -i example-hosts -u $USERNAME -b --ask-become-pass ci-provision.yml --limit $HOST_OR_GROUP_NAME

List the hosts that would be targeted by a command, don't do anything else:

ansible-playbook -i example-hosts ci-provision.yml --list-hosts

Playbooks which do not alter hardware can often be tested in Docker instead of a full VM, for example by using the omero-ssh image:

docker run -d omero-ssh
# Optional:
ssh-copy-id omero@
# Pass -K if sudo requires a password, and -k if ssh keys aren't setup
ansible-playbook -i etc/test-hosts -u omero ci-deployment.yml -bv


A repository containing scripts for managing infrastructure



No packages published