If you are using ansible with AWS, you ar eprobably familiar with the 
ec2.py, an external invnetory script.
because API calls to AWS are time consuming, the inventory is built and 
cached locally.

Now when I run  
python ec2.py --boto-profile 1234 list
I see in the cache directory another subdirectory
profile_1234

If I do the same with another profile, I have another subdir.


Now as described in 
http://docs.ansible.com/ansible/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script

when I run ansible with the command 

AWS_PROFILE=1234 ansible -i ec2.py ....

that build another cache 
at the top level of the cache directory.
IT DOESN'T USE the cache in the subdir.

Now, the problem is that if I change account 'quickly', the cache stay the 
same and is not reflecting the inventory of the account I just switched to.

1/ Is there a way to pass parameters to an external inventory script on the 
'ansible' command line?
i.e. --inventory='ec2.py --boto-profile 7009'

??? Maybe I can use a wrapper around ec2.py ???

2/ Is there a way to tell ansible to force a refresh of the ec2.py cache?

Best,
--
Emmanuel

-- 
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/6aecb237-25c7-4f11-aa82-fcb96bd82eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to