mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Configurable and parallel gather facts (#49399)
* Configurable list of facts modules (#31783) - allow for args dict for specific modules - add way to pass parameters - avoid facts poluting test - move to 'facts gathered' flag - add 'gathering' setting tests - allow parallel option in case serialization is too slow - added support to automatically map network facts uses "smart" connection mapping
This commit is contained in:
23
test/integration/targets/gathering/implicit.yml
Normal file
23
test/integration/targets/gathering/implicit.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
- hosts: testhost
|
||||
tasks:
|
||||
- name: check that facts were gathered but no local facts exist
|
||||
assert:
|
||||
that:
|
||||
- ansible_facts is defined and 'fqdn' in ansible_facts
|
||||
- not 'uuid' in ansible_local
|
||||
- name: create 'local facts' for next gathering
|
||||
copy:
|
||||
src: uuid.fact
|
||||
dest: /etc/ansible/facts.d/
|
||||
mode: 0755
|
||||
|
||||
- hosts: testhost
|
||||
tasks:
|
||||
- name: ensure facts are gathered and includes the new 'local facts' created above
|
||||
assert:
|
||||
that:
|
||||
- ansible_facts is defined and 'fqdn' in ansible_facts
|
||||
- "'uuid' in ansible_local"
|
||||
|
||||
- name: cleanup 'local facts' from target
|
||||
file: path=/etc/ansible/facts.d/uuid.fact state=absent
|
||||
Reference in New Issue
Block a user