You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we have a task something like this in our code:
- name: FACTS | Classify hosts depending on their OS distribution and versiongroup_by:
key: os_{{ ansible_facts['distribution'] }}{{ ansible_facts['distribution_major_version'] }}tags: facts
- name: FACTS | Classify hosts depending on their countrygroup_by:
key: country_{{ ansible_facts['ansible_local']['custom']['country'] }}tags: facts
This would create an ad-hoc group like os_CentOS7 or country_za
during the playbook run.
It seems this data is not in the ansible-inventory output.
There's an open PR (#215) that replaces the custom fact parser with ansible's default parser. I'm hoping this feature will be supported out of the box when I merge that PR.
Thanks for this great software.
We use group_by ansible module to create ad-hoc groups based on our custom facts. This creates ad-hoc groups like env_dev env_prod , os_el6 etc.
Is there is a way to get these groups to be detected in ansible-cmdb?
The text was updated successfully, but these errors were encountered: