(Ab)using Docker for automated testing of Ansible roles on multiple distros with Travis-CI
Bert Van Vreckem - Monday , 6/2/2017, 15:40 - 16:20 - B1.017
In this session, a method is introduced for automating functional/acceptance tests of Ansible roles. Docker is leveraged to set up a test environment on Travis-CI for multiple Linux distributions. The role under test is applied to the test container. After that, tests can be executed, both white box tests from inside the container as well as black box (functional/acceptance tests) from the Travis-CI environment. A first proof-of-concept of this setup was submitted as a PR for Jeff Geerling's Apache role and is now being used by him and other role authors. Although this technique is really quite for testing a role on several Linux distributions and versions at once, Docker is not the perfect fit. It has some drawbacks and limitations, hence the "ab-" in the title. These will also be discussed in the talk.
Bert Van Vreckem is lecturer computer science at University College Ghent. He teaches a.o. Linux system administration and research methods. His interests include Ansible, Vagrant, automating all the things, and anything related to system administration education. He has published about a dozen Ansible roles on Galaxy, mostly targeting CentOS/EL.