a )g@sRddlmZmZmZeZddlmZddlm Z ddlm Z ddZ d dd Z dS) )absolute_importdivisionprint_function)PrefixFactNamespace)default_collectors)ansible_collectorcCs|jd}t||dS)acompat api for ansible 2.2/2.3 module_utils.facts.get_all_facts method Expects module to be an instance of AnsibleModule, with a 'gather_subset' param. returns a dict mapping the bare fact name ('default_ipv4' with no 'ansible_' namespace) to the fact value. gather_subset)r)params ansible_facts)modulerr E/usr/lib/python3.9/site-packages/ansible/module_utils/facts/compat.py get_all_facts%s rNc Cst|p|jddg}|jdd}|jdd}tgd}tj}tdd d }tj||||||d }|j|d }|S) aCompat api for ansible 2.0/2.2/2.3 module_utils.facts.ansible_facts method 2.3/2.3 expects a gather_subset arg. 2.0/2.1 does not except a gather_subset arg So make gather_subsets an optional arg, defaulting to configured DEFAULT_GATHER_TIMEOUT 'module' should be an instance of an AnsibleModule. returns a dict mapping the bare fact name ('default_ipv4' with no 'ansible_' namespace) to the fact value. rallgather_timeout filter*)ZapparmorZcapsZcmdlineZ date_timeZ distributionZdnsenvZfipslocalZlsbZpkg_mgrplatformZpythonZselinuxZ service_mgrZ ssh_pub_keysuserZansible)Znamespace_nameprefix)all_collector_classes namespace filter_specrrminimal_gather_subset)r ) r get frozensetrZ collectorsrrZget_ansible_collectorZcollect) r rrrrrrZfact_collectorZ facts_dictr r r r 1s    r )N) Z __future__rrrtypeZ __metaclass__Z$ansible.module_utils.facts.namespacerZansible.module_utils.factsrrrr r r r r s