This is how i've been doing it (not sure if you can implement)
inventory:
[GroupA]
host1
[GroupB]
host1
[Groups:children] . #throw all your vars that are the same for each group
here
GroupA
GroupB
-------------
* make group_vars for each group name with specific variables and then
calli in your playbook:
- hosts: 'GroupA'
vars_files:
- ../group_vars/GroupA
roles:
- blah blah blah
- hosts: 'GroupA'
vars_files:
- ../group_vars/GroupB
roles:
- blah blah blah
On Mon, Jan 13, 2020 at 10:11 AM Konstantinos Tzevelekidis <
[email protected]> wrote:
> Hello,
>
> This is what I did and it didn't work. Different groups mean different
> configuration for my application (that is the reason of such distinction),
> so if I use HostA under both groups, it doesn't do the deployment twice in
> the same host but only for the last one.
>
> Best Regards,
> Konstantinos
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/d3e09cc9-e792-4c63-8077-35be809ee8f2%40googlegroups.com
> .
>
--
Austin Wolfson
DevOps Engineer, CEH
Interactions, LLC
--
*******************************************************************************
This e-mail and any of its attachments may contain
Interactions LLC
proprietary information, which is privileged,
confidential, or subject to
copyright belonging to the Interactions
LLC. This e-mail is intended solely
for the use of the individual or
entity to which it is addressed. If you
are not the intended recipient of this
e-mail, you are hereby notified that
any dissemination, distribution, copying,
or action taken in relation to
the contents of and attachments to this e-mail
is strictly prohibited and
may be unlawful. If you have received this e-mail in
error, please notify
the sender immediately and permanently delete the original
and any copy of
this e-mail and any printout. Thank You.
*******************************************************************************
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAP6t4Mv_dw-P5vqKQ5NA4J%2BjspVV6jwhsbb36WVpHaziU%3DA0eQ%40mail.gmail.com.