Hi,

I want set multi-cluster but don't want defined multi-inventory files. Is 
there any solution for looping a variable defined for a group?

For example, inventory file is

[idc1-master]
host1  cluster-node=idc1-node

[idc1-node]
host2
host3

[idc2-master]
hosti  cluster-node=idc2-node

[idc2-node]
hostj
hostk

playbook file

- name: add nodes
  debug:  msg={{item}}
  with_items:
       cluster-node
  tags:
      - add-node

But this doesn't work, variable cluster-node now is a string not a group. 
Any help?

Thanks,
Linbo

-- 
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/0545f46d-32f2-4353-a2c4-20df9129d5a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to