facts.yaml: reduce the number of setup calls by ~7x (#7286)
Before this commit, we were gathering:
1 !all
7 network
7 hardware
After we are gathering:
1 !all
1 network
1 hardware
ansible_distribution_major_version is gathered by '!all'
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
(cherry picked from commit fb8b075110
)
This commit is contained in:
parent
efd138e752
commit
716a66e5d3
1 changed files with 16 additions and 11 deletions
27
facts.yml
27
facts.yml
|
@ -7,15 +7,20 @@
|
||||||
setup:
|
setup:
|
||||||
gather_subset: '!all'
|
gather_subset: '!all'
|
||||||
|
|
||||||
- name: Gather necessary facts
|
# filter match the following variables:
|
||||||
|
# ansible_default_ipv4
|
||||||
|
# ansible_default_ipv6
|
||||||
|
# ansible_all_ipv4_addresses
|
||||||
|
# ansible_all_ipv6_addresses
|
||||||
|
- name: Gather necessary facts (network)
|
||||||
setup:
|
setup:
|
||||||
gather_subset: '!all,!min,network,hardware'
|
gather_subset: '!all,!min,network'
|
||||||
filter: "{{ item }}"
|
filter: "ansible_*_ipv[46]*"
|
||||||
loop:
|
|
||||||
- ansible_distribution_major_version
|
# filter match the following variables:
|
||||||
- ansible_default_ipv4
|
# ansible_memtotal_mb
|
||||||
- ansible_default_ipv6
|
# ansible_swaptotal_mb
|
||||||
- ansible_all_ipv4_addresses
|
- name: Gather necessary facts (hardware)
|
||||||
- ansible_all_ipv6_addresses
|
setup:
|
||||||
- ansible_memtotal_mb
|
gather_subset: '!all,!min,hardware'
|
||||||
- ansible_swaptotal_mb
|
filter: "ansible_*total_mb"
|
||||||
|
|
Loading…
Reference in a new issue