No, you *cannot* do what Tomas says above and then still target "-i
inventory" as one common infrastructure.

instead, do this.

Inside your inventory/production put all hosts under a group named
"production"

Inside your inventory/stage, put all hosts under a group named "stage".




On Tue, Aug 26, 2014 at 12:24 PM, Tomasz Kontusz <[email protected]>
wrote:

>
>
> Jordi Funollet <[email protected]> napisał:
> >With this schema,
> >
> >
> >
> >inventory/production                # inventory file for production
> >serv
> >ers
> >inventory/stage                     # inventory file for stage
> >environme
> >nt
> >
> >inventory/group_vars/
> >group1                 # here we assign variables to particular group
> >s
> >group2                 # ""
> >
> >
> >
> >can vars have different values on every environment? Or must
> >group names be different on every environment?
> You'd have to have different group names, or move the differing vars into
> inventories.
> You can also use a schema like this:
>
> production/group_vars/...
> production/inventory
> staging/group_vars/...
> staging/inventory
>
> group_vars/... # those are common
> playbookA.yml
> playbookB.yml
> site.yml
>
> >--
> >
> >Jordi Funollet Pujol
> >
> >http://www.linkedin.com/in/jordifunollet
>
> --
> Wysłane za pomocą K-9 Mail.
>
> --
> 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/21778c9a-5733-4b50-9865-9e0ba8a1b5f8%40email.android.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/CA%2BnsWgxwPznz3uyceBy0M%3DCK7p%2BJB%3DT-pH2j8C_k8dFdO751LQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to