Fixed want_facts in the foreman inventory plugin - fixes #65111 (#65114)

* Replaced 'ansible_facts' by 'foreman_facts'

'foreman_facts' is the key that the foreman inventory script used
'ansible_facts' is a special key that is overwritten internally and has never worked in this inventory plugin

* Added changelog
pull/65305/head
JeferCatarina 5 years ago committed by Sloane Hertel
parent 39ebd244e3
commit 4c589661c2

@ -0,0 +1,3 @@
bugfixes:
- foreman inventory plugin - Populate host variable information using the "foreman_facts" key
rather than the internal "ansible_facts" key. (https://github.com/ansible/ansible/issues/65111)

@ -229,7 +229,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable, Constructable):
# set host vars from facts # set host vars from facts
if self.get_option('want_facts'): if self.get_option('want_facts'):
self.inventory.set_variable(host_name, 'ansible_facts', self._get_facts(host)) self.inventory.set_variable(host_name, 'foreman_facts', self._get_facts(host))
strict = self.get_option('strict') strict = self.get_option('strict')

Loading…
Cancel
Save