Automating Foreman and Katello with Ansible

Foreman is a great tool to automate all the things around your infrastructure, but how can you automate Foreman itself?

This is a companion discussion topic for the original entry at
1 Like

Looks great. Are all those tasks idempotent?

Can I automate initial setup of Foreman provisioning? That’d be: domain, subnet, os, installation media, templates, association of all templates, architecture, hostgroup.

Thanks lzap!

most of the tasks are idempotent. From the examples I gave in the post, katello_sync is not – mostly because it just triggers a sync, that can’t really be idempotent and katello_content_view_version is not in the way I used it – have a look at the module docs to see what’s needed to make it idempotent.

And yes, I think we should have all of the mentioned tasks for provisioning covered.
@sthirugn is currently working on a “zero to hero” setup for katello content and I think the same for provisioning would be a good addition.

1 Like