Thanks Brain, Giovanni
I'm confused on when to use ec2.py dynamic inventory and when creating
group as you suggested.
If I understand correctly, the first make sense if I want to query info set
by others, while the second make more sense if the servers live and die in
the scope of my playbook (my use case).
I'm currently using hostvars from ec2.py to get the internal ips of servers:
- command: echo "{{ hostvars[item].ec2_private_ip_address }}"
with_items: groups.tag_Name_Cassandra
register: output
changed_when: no
Can I get the internal IP without ec2.py?
If I can not, refreshing the inventory between plays is mandatory - going
back to my original question.
On Thu, Jan 29, 2015 at 5:14 PM, Brian Coca <[email protected]> wrote:
> add_host affects the 'current run', all subsequent plays will have
> access, the distribtion of the plays in different files does not
> matter.
>
> ansible reads all the files passed to it (directly or through
> includes), compiles the plays and then runs them in order, at this
> point the files they came from are irrelevant.
>
> --
> Brian Coca
>
> --
> 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/1x5hFy4dzcQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAJ5XC8mj7zx5tN7SwA_n3aB3EYb%3DKVk4tmYx5ZSRB_2d9ujQRw%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Regards
@TzachL
--
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/CAGLV4Ven5_R3nLVY%2BujmO4-RT4FunBdmYyreSTMXGnuQT_OnVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.