Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use Foreman config groups to set Ansible groups #55508

wants to merge 1 commit into
base: devel


None yet
3 participants
Copy link

commented Apr 18, 2019


Foreman has the ability to set "config groups" on hosts. Unlike Foreman's "host groups", you can have multiple config groups assigned to a host, basically allowing host tagging. This PR adds the ability to set Ansible inventory groups based on these config groups. Config groups were added to Foreman for assigning Puppet classes so we'd be using them for a similar purpose.

  • Feature Pull Request

Foreman inventory plugin

@@ -232,6 +247,14 @@ def _populate(self):
if self.get_option('want_facts'):
self.inventory.set_variable(host['name'], 'ansible_facts', self._get_facts(host))

# set Ansible groups from Foreman config groups
if self.get_option('use_config_groups'):

This comment has been minimized.

Copy link

bcoca Apr 18, 2019


instead of adding them directly why not expose as a variable and let user decide if they want to create groups based on it in 'compose'?

@ansibot ansibot added the stale_ci label Apr 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.