Colors of Noise

Entries tagged "ansible".

Foreman's Ansible integration
19th August 2016

Gathering from some recent discussions it seems to be not that well known that Foreman (a lifecycle tool for your virtual machines) does not only integrate well with Puppet but also with ansible. This is a list of tools I find useful in this regard:

There's also support for triggering ansible runs from within Foreman itself but I've not used that so far.

Tags: ansible, planetdebian, planetfsfe, theforeman.
Running ansible's integration tests
9th December 2015

ansible is a great tool for deployments. While it doesn't ship that many unit tests it comes with heaps of integration tests that can be run using:

git submodule update --init
. hacking/env-setup
cd test/integration

after cloning the repo from here.

However when working on individual parts one often only wants to test a single role. This can be done via:

git submodule update --init
. hacking/env-setup
cd test/integration
ansible-playbook -e @integration_config.yml -i"testhost," -c local test_filters.yml

when e.g. working on some new filers or when you want to run one of the destructive modules, test_apt in this case:

git submodule update --init
. hacking/env-setup
cd test/integration
# Destructive tests usually need sudo
sudo ansible-playbook -e @integration_config.yml -i"testhost," -c local destructive.yml --tags=test_apt

The list of available tags can be ssen in test/integration/destructive.yml.

Just putting it here since I just found myself digging this out the second time.

Tags: ansible, continuous-delivery, planetdebian.

RSS Feed