Evgeni Golov

Debian Developer, Red Hat Engineer, ♥ automation

The speaker's profile picture

Talks

Maintaining over 40 Ansible modules: 4 years later

The Foreman community maintains a collection of over 40 Ansible modules for interaction with the Foreman API and the various plugin APIs. This all started with two modules in ansible/ansible in 2016 and escalated from there.

Today we want to share the lessons learned from these three years of module development and maintenance.
Including:

  • efficient abstraction -- all modules talk to the same base API, receive the same credentials and execute similar actions, let's abstract that away!
  • good tests -- nobody wants to break stuff, but you have to assert that.
  • migrating to new API libraries -- should be fairly easy with an abstraction layer, right?
  • onboarding new contributors -- (un)surprisingly the hardest part after you've built something for your own needs.

We also want to talk about what's next: How we can further improve and ease the interaction? Which challenges we see in the future?

Developing Ansible modules for Foreman and Katello

The Foreman community maintains a collection of over 40 Ansible modules for interaction with the Foreman API and the various plugin APIs. This all started with two modules in ansible/ansible in 2016 and escalated from there.

Today we want to show how development of our modules works:
1. setting up a test environment (Foreman/Katello VM)
2. preparing a development environment (Python virtualenv with Ansible and dependencies)
3. understanding and adjusting the test playbooks
4. recording test fixtures (it's 2020 and we still ♥ VCR)
5. extending and fixing existing modules
6. writing completely new modules