How to handle template hostgroup association via ansible

Problem:

We want to manage our complete foreman installation because of the size. Doing it manually is not an option at all. Currently we implemented both hostgroup and provisioning template management. Now we realize that there is neither an ansible module or options in hostgroup or provisioning_template module to handle template_combinations.

Expected outcome:

It would be great if there is either a module for template_combination or appropriate options options either in hostgroup or provisioning_template module.

Foreman and Ansible module versions:

Foreman server: 2.1.2
Foreman ansible modules: 1.3.0

Other relevant data:

Feature request at github was opened as well.

Hey Christian,

thanks for raising this! This sounds like a totally valid RFE to me. A separate module is usually what we would do in this case. Won’t promise any timelines, but looking at the API it doesn’t look too complicated to implement.

Will follow up on GH as soon as there is anything noteworthy.

Evgeni

2 Likes

Would be great because doing the association by hand is one of the most annoying tasks in foreman. Especially with dozens of templates. And there is no way of inheritance for those associations.

Not having to do things by hand is why we started the whole ansible collection thing :wink: