i have a flat list of hosts, no groups, no variables, total is over
15k. when i run
$ head inv-expanded.yml
all:
hosts:
admin:
admin1:
admin2:
admin3:
admin4:
admin5:
admin6:
...snipped...
$ time ansible-inventory -i inv-expanded.yml --list > a
real 0m28.334s
user 0m23.725s
sys 0m4.452s
$ ansible-inventory --version
ansible-inventory 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-inventory
python version = 3.6.8 (default, Oct 20 2022, 09:31:56) [GCC 8.5.0
20210514 (Red Hat 8.5.0-15)]
$ head -n20 /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 49
model name : AMD EPYC 7302P 16-Core Processor
stepping : 0
microcode : 0x8301055
cpu MHz : 3000.000
cache size : 512 KB
when i include the groups and variables this slows down even more.
this ticket https://github.com/ansible/ansible/issues/30534 seems to
claim that there used to be an issue in the v2.3/v2.4 era, but it was
fixed and i should be seeing ~6s or less
is there a way to speed this up without splitting the inventory file
into multiple smaller files?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CABOsP2Nwipj7G7ziDms1s8eQ3BUgKzzTF2%3D1-AQxMVsL%3D1U1Kw%40mail.gmail.com.