EC2 script cache across inventories

23 views
Skip to first unread message

Gary Malouf

unread,
Mar 25, 2015, 2:42:27 PM3/25/15
to ansible...@googlegroups.com
We split our ec2 environment into separate vpcs and until now, have been deploying to each via our own laptops.  (Limited to credentials root users, 2)

I ran into an issue today where I did the following:

ansible-playbook -i inventories/staging myawesomeplaybook.yml

*Runs playbook on staging instances as expected

ansible-playbook -i inventories/production myawesomeplaybook.yml

!Runs playbook on staging instances when should actually be production


Clearing out the ec2 cache resulted in the correct behavior, but this seems like a very dangerous characteristic.  Is there an idiomatic way of handling differing staging from production inventories in EC2?

Brian Coca

unread,
Mar 25, 2015, 3:17:56 PM3/25/15
to ansible...@googlegroups.com
I would update the ec2.ini to use different cache directories.

cache_path = ~/.ansible/tmp/ec2_prod



--
Brian Coca

Gary Malouf

unread,
Mar 25, 2015, 8:40:05 PM3/25/15
to ansible...@googlegroups.com
Thanks, that worked great!


--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/WtuTEIRDxCU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8muJvcigU8Yob8O%2BZHaVy368H1%2BrGsfNyfUBr3mK9XxYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages