We lay ours out in the playbook directory like this

site.yml
prod/
    - group_vars/
        - all
    - hosts
staging/
   - group_vars/
      - all
   - hosts

and then run with

    ansible-playbook -i $environment site.yml


On 24 August 2016 at 16:02, skinnedknuckles
<andersonjonatha...@gmail.com> wrote:
> Management Node:
>
> CentOs 6
> Ansible 2.1
>
> Remote Node:
>
> Windows 7
> Powershell 3.0
>
>
> My playbooks are all saved in /home/username/playbooks.
>
> My inventory file is saved as /etc/ansible/hosts.
>
> And I also use the file etc/ansible/group_vars/windows.yml
>
> I find it a hassle to go back and forth between these 2 locations.  Why
> can't I define my inventory and group vars in my playbooks directory?  What
> is the best way to do that?
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/60334eae-42fb-4154-b65f-a5090313c8f7%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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAK5eLPQZOWCMKSwqYpq9fEMkdHfOoKemjjEQ449msfX510ftAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to