The behavior is the same if I specify -i ec2.py. I like to specify
inventory manually instead of making it a global setting. Are you saying
the yml should call the python script?

On Thu, Dec 13, 2018 at 10:07 PM Tony Chia <[email protected]> wrote:

>
>
> That is expected.
>
> If you don’t specify -i how the ansible-playbook know you want to run
> against production or staging or test env ?
>
> You could probably set some defaults using the inventory  setting under
> defaults section in ansible.cfg. For example
>
> https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
>
> I would probably organize all the inventories in one folder by moving the
> production, staging and test folder under an inventory folder
>
> Then you should be able to run
> Ansible-playbook -i inventory/production my-play.yml and pick up the
> grou_vars and host_vars
>
> --
> 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/3e83bf7b-346e-424f-9612-2b99593e603c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to