Hello,
Finally we made it work using the following approach:
Inventory file:
Host1 mygroups='["groupA","groupB"]'
Created two playbook files one with the tasks (PlaybookTasks.yml) and one that
does an iteration (Playbook.yml)
Playbook.yml:
---
- hosts: all
tasks:
- include:
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,
Hello,
What I want to have is one host folder (i.e. Host1) which will contain a
vars.yml that will define the actual ansible_host (i.e. "1.2.3.4"). So, in the
inventory I will need to have:
[GroupA]
host1A ansible_host=Host1
[GroupB]
host1B ansible_host=Host1
where the ansible_host will take
Hello,
Thanks a lot for your help! From what I understand is that the ansible_host
should be the actual hostname (dns entry). Is there any way to pass the to the
ansible_host the name of an entry in the host_vars?
For example, I have in the host_vars directory, the folder Host1 where it has a
Hello,
I have the following inventory:
Test.inventory
[GroupA]
Host1
[GroupB]
Host1
GroupA and GroupB contain the same variables but with different values (e.g.
filename). It seems that every time the playbook runs for this inventory, it
does the steps once for the host (i.e. only for one of