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
This commit is contained in:
JeferCatarina 2019-11-26 15:41:28 -03:00 committed by Sloane Hertel
parent 39ebd244e3
commit 4c589661c2
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -229,7 +229,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable, Constructable):
# set host vars from 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')