community.general/lib/ansible/module_utils/facts
Adrian Likins 6e585bdf24
Fact collector ordering deps (#31362)
Add deps/requires for fact collectors

Fact collectors can now set a required_facts
class attribute that will be a set of the names
of fact collectors they require to be run first.

ie, if a collector needs to know the ansible_distribution,
it should set it's required_facts to include 'distribution'

        required_facts = set(['distribution'])

If a collector requires another collector, it gets added
to the selected collector names.

We then topological sort the ordering of the collectors
so that deps work out (ie, 'distribution' will run before
'service_mgr')

required_facts were added to the collectors for:

        - network (requires 'distribution', 'platform')
        - hardware (requires 'platform')
        - service_mgr (requires 'distribution', 'platform')

Fix name references for facts (need 'ansible_' prefix)
is service_mgr

Fixes #30753
2018-01-22 18:23:40 -05:00
..
hardware Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
network Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
virtual added new IBM Power KVM guest recognisation (#35169) 2018-01-22 14:29:44 -05:00
__init__.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
ansible_collector.py Fix fact deps when 'filter=ansible_fact' is used. (#33441) 2018-01-20 15:07:27 -05:00
collector.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
compat.py namespace facts 2017-11-09 09:48:14 -05:00
default_collectors.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
namespace.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
sysctl.py Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
utils.py Correctly write SELinux config file (#31251) 2017-10-03 23:38:58 -04:00