- name: Ble
hosts: hosts
sudo: yes
roles:
- role1
- role2
- role3
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6d99be91-bbc8-43e0-85a5-84a45908c7bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/M
/M
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/21b60cb2-f02c-4c35-9c0e-0ebc3511fbf6%40googlegroups.com.
So given:
[dbservers]
Node1
Node2
Is there a way to (in the play) get info on which group the play is running against?
I.e something that will tell me 'dbservers'?
Or is that something I have pass in as a variable?
/M
/M
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7d254bd2-c284-4607-bed1-3c57501f323a%40googlegroups.com.
- name: test
debug: msg="Running against hostgroup {{ group_names }} "
with_items: groups['cluster1']
Output (snipped):
ok: [node1] => (item=node1) => {
"item": "node1",
"msg": "You are running against hostgroup ['cluster1'] "
}
ok: [node2] => (item=node1) => {
"item": "node1",
"msg": "You are running against hostgroup ['cluster1'] "
....