community.general/lib/ansible/module_utils
Adrian Likins 95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
2017-09-28 10:36:22 -04:00
..
aws Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
facts Fix fact failures cause by ordering of collectors (#30777) 2017-09-28 10:36:22 -04:00
parsing also strip strings to avoid spaces breaking match 2017-08-23 16:01:02 -04:00
powershell CamelConverter - more fixes picked up in testing (#30601) 2017-09-20 15:17:26 +10:00
six Update the bundled six library to 1.11.0 2017-09-17 22:00:02 -07:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
_text.py Fix for to_text and to_bytes error handlers 2017-07-24 09:19:04 -07:00
a10.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
aci.py Fix typo 2017-09-09 20:26:21 +02:00
aireos.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
ansible_tower.py Fixes verify_ssl option when False in ansible_tower module util (#30308) 2017-09-14 12:03:33 +02:00
aos.py Remove wildcard imports and get_exception calls 2017-08-12 00:48:53 -07:00
api.py Remove comments about import order 2017-08-07 19:46:06 -07:00
aruba.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
asa.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
avi.py module_utils/avi.py: fix broken import 2017-09-14 10:59:25 -07:00
azure_rm_common.py Feature to Specify AZURE blob storage type (#30660) 2017-09-22 10:17:00 -07:00
basic.py Enable more pylint rules and fix reported issues. (#30539) 2017-09-18 23:20:32 -07:00
bigswitch_utils.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ce.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
cloud.py AWSRetry: allow retrying on additional ClientError exceptions (#28483) 2017-08-22 15:31:20 -04:00
cloudstack.py cs_volume: fix CloudStackException dependency (#30389) 2017-09-15 20:40:28 +02:00
cnos.py Resolving bug on CNOS Image download on multiple devices. 2017-09-16 10:53:21 -07:00
cnos_devicerules.py Changing new Device name from <Device Name>_cnos to <Device Name> (#27025) 2017-07-21 11:18:59 +01:00
cnos_errorcodes.py spelling fixes (non-trivial, changing messages) (#25094) 2017-06-01 10:45:19 +01:00
connection.py Remove wildcard imports and get_exception calls 2017-08-12 00:48:53 -07:00
crypto.py openssl: remove static dict for keyUsage (#30339) 2017-09-14 12:03:00 -04:00
database.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
dellos6.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
dellos9.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
dellos10.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
digital_ocean.py Fix digital_ocean module_util api_token bug (#28924) 2017-09-06 07:14:10 -07:00
dimensiondata.py Refactor dimensiondata_network module (#21043) 2017-02-09 11:30:31 +00:00
docker_common.py docker_secret: fix broken import 2017-08-12 10:16:05 -07:00
ec2.py [cloud] Improve boto3_tag_list_to_ansible_dict backward compatibility (#30622) 2017-09-27 11:27:26 -04:00
eos.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
exoscale.py exoscale: similar env vars as in cloudstack 2017-08-22 14:43:48 +02:00
f5_utils.py Remove wildcard imports 2017-07-28 22:10:17 -07:00
fortios.py Use ansible network env vars to authentication on fortigates (#29499) 2017-09-13 12:44:41 +01:00
gcdns.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
gce.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
gcp.py Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
infinibox.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ios.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
iosxr.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
ipa.py shared argument spec for FreeIPA (#28950) 2017-09-07 21:07:15 +02:00
ismount.py fix typo 2016-02-08 19:10:04 +01:00
json_utils.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
junos.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
k8s_common.py Allow for generating kubernetes YAML files from modules (#27833) 2017-08-07 13:04:03 -04:00
known_hosts.py In the git module let ssh do its own host checking 2017-06-26 10:45:19 -07:00
lxd.py Use to_text helper function to handle bytes and unicode 2017-06-05 11:58:19 -07:00
manageiq.py New model manageiq manageiq provider (#28273) 2017-08-29 22:54:35 -04:00
mysql.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
netapp.py Refactor E-Series VolumeCopy to use module_utils (#20902) 2017-08-07 09:18:26 -06:00
netcfg.py fix unicode errors in iosxr 2017-07-19 14:51:35 -07:00
netcli.py Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
netconf.py Fix fetch configuration in junos_command (#26392) 2017-07-28 23:06:21 +05:30
netscaler.py Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
network.py Remove wildcard imports and get_exception calls 2017-08-12 00:48:53 -07:00
network_common.py fixes issue where filter wouldn't error on undefined var (#30921) 2017-09-26 11:50:57 -07:00
nxos.py Fix nxos provider transport warning issue (#30610) 2017-09-22 10:32:25 +05:30
oneview.py Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
openshift_common.py k8s/openshift module_utils split (#23115) 2017-03-30 19:02:17 +02:00
openstack.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
ordnance.py Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
ovirt.py module_utils/ovirt.py: fix broken import 2017-09-08 22:12:00 -07:00
postgres.py Remove wildcard imports and get_exception calls 2017-08-12 00:48:53 -07:00
pure.py Initial commit for Pure Storage Ansible module (#25386) 2017-06-16 11:28:50 +01:00
pycompat24.py Fix undefined variables, basestring usage, and some associated python3 issues 2017-07-25 15:58:23 -07:00
rax.py Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
redhat.py Miscellaneous pylint fixes. 2017-09-13 01:53:08 -07:00
service.py Misc typo for Ansible 2017-06-21 11:19:41 -04:00
splitter.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
sros.py Update removed_in_version to 2.9 for network module top level cred args (#30416) 2017-09-15 21:20:07 +05:30
univention_umc.py Collated PEP8 fixes (#25293) 2017-06-02 12:14:11 +01:00
urls.py Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
vca.py Use response.content instead of response object (#25772) 2017-08-14 12:40:06 -04:00
vmware.py vmware_guest: tests for createvm+modifyvm tasks (#30959) 2017-09-27 18:10:08 -04:00
vyos.py Remove check_args for vyos modules (#30739) 2017-09-22 15:56:23 +05:30