theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
146 stars 163 forks source link

template_combinations of hostgroups, environments and provisioning_templates should be configurable via ansible modules as well #974

Open cmeissner opened 3 years ago

cmeissner commented 3 years ago
SUMMARY

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:

ISSUE TYPE
infernix commented 3 years ago

Ran into the same issue, for what I can tell it is part of submitting the template, so it should be an parameter to provisioning_template itself.

cmeissner commented 3 years ago

Not sure if the provisioning_template module is the right place for this. I guess the operating_system module is a good place for os defaults. But the I think it's a better idea to create a new module for provisioning_template and hostgroup association.

SimonLorentz commented 3 years ago

Hi you can assign templates to a OS already with: https://theforeman.github.io/foreman-ansible-modules/v1.5.1/plugins/os_default_template_module.html#ansible-collections-theforeman-foreman-os-default-template-module

I hope this is what you want

cmeissner commented 3 years ago

To assign templates to an OS is sometimes not enough and we need to define associations inside the template UI based on hostgroups and/or environments. And this issue points exactly to that small piece of configuration ability.