I have my inventory separated into environment-specific directories, with
an ec2 dynamic inventory script in each inventory dir. Each ec2 inventory
script filters out instances by their "Environment" tag. I run my playbooks
by using the '-i' command-line parameter and pointing to the specific
environment inventory I want to run, which normally works.

However, I ran into an issue this morning where I was trying to run a
playbook against my staging servers but ansible-playbook was instead
running it over my prod servers. I re-ran it a few times, including
--list-hosts to confirm the instances it was trying to apply the playbook
to, but it was still using my prod inventory. I also confirmed that I was
using '-i inventory/stage/' in the command, which I was.

I had a thought, and removed both /tmp/ansible_fact_cache and
~/.ansible/tmp/* and re-ran the exact same command, and this time my
staging inventory was used correctly.

Is this a known issue? Have I configured something wrong here? I'm very
confused by this behaviour.

Thanks,
Guy

-- 
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/CANNH9muXO3G%3D1DhqzcmzffD7o706Efm%3DEXxuPt84sG93cT23Kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to