Hi,
I'm using dynamic inventory and I pull the host list/groups from an
external source (anonymous ldap query to freeipa). I have no host_vars
directories but every time I run ansible it tries to read the .yml, .yaml,
.json for each host returned from the external source. I understand that
every file in the host_vars directories has to be parsed, it's just the way
ansible works, but in case the host_vars directories don't exist, shouldn't
ansible not look for any files there? Just stating all those non existent
files makes the process very slow.
Ex:
stat("/opt/ansible/plugins/inventory", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
stat("/opt/ansible/plugins/inventory", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
stat("/opt/ansible/plugins/inventory/host_vars/host1.testdomain",
0x7ffeb541cf00) = -1 ENOENT (No such file or directory)
stat("/opt/ansible/plugins/inventory/host_vars/host1.testdomain",
0x7ffeb541cf00) = -1 ENOENT (No such file or directory)
stat("/opt/ansible/plugins/inventory/host_vars/host1.testdomain.yml",
0x7ffeb541cf00) = -1 ENOENT (No such file or directory)
stat("/opt/ansible/plugins/inventory/host_vars/host1.testdomain.yaml",
0x7ffeb541cf00) = -1 ENOENT (No such file or directory)
stat("/opt/ansible/plugins/inventory/host_vars/host1.testdomain.json",
0x7ffeb541cf00) = -1 ENOENT (No such file or directory)
stat("./", {st_mode=S_IFDIR|0700, st_size=1024, ...}) = 0
getcwd("/home/ansible", 1026) = 14
stat("/home/ansible/host_vars/host1.testdomain", 0x7ffeb541cf00) = -1
ENOENT (No such file or directory)
stat("/home/ansible/host_vars/host1.testdomain", 0x7ffeb541cf00) = -1
ENOENT (No such file or directory)
stat("/home/ansible/host_vars/host1.testdomain.yml", 0x7ffeb541cf00) = -1
ENOENT (No such file or directory)
stat("/home/ansible/host_vars/host1.testdomain.yaml", 0x7ffeb541cf00) = -1
ENOENT (No such file or directory)
stat("/home/ansible/host_vars/host1.testdomain.json", 0x7ffeb541cf00) = -1
ENOENT (No such file or directory)
Has anyone stumbled upon this?
Tks
JS
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ec86bef3-0c55-4bcd-9b59-94aa9c71778f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.