>Are all of the files you're referencing vault-encrypted, or does the 
slowness come from the initialization of the VaultLib?

 Only one file is vault encrypted, but (almost) every role references it as 
a vars file. I don't know which part in particular is slow; I noticed the 
delay after an open() on the vault file when stracing ansible and then just 
confirmed it decrypted the file each time without digging any further.

> It might be better to cache that object based on the encryption method 
and/or hashed password rather than the unencrypted contents of the YAML 
files themselves.

The choice to cache the parsed YAML rather than something lower down the 
chain was made because that avoided the most work for ansible and, since I 
know YAML files don't changes during execution, seemed safe. An initial 
attempt only cached the decryption result, which already improved speeds 
considerably but was still about three times as slow as caching the lot.

I just tried caching only the VaultAES256 object instead of the above 
approach, but that made no difference to the start up time.

 --J

-- 
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/a252a080-a0e6-40da-9467-3359e91f93c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to