DOC fix: typo in group addressing syntax (#67994)

This commit is contained in:
Fedor V
2020-03-24 11:03:08 +03:00
committed by GitHub
parent 3d6807f098
commit 967e05bb23

View File

@ -420,7 +420,7 @@ Anyway, here's the trick:
Notice how we're pulling out the hostname of the first machine of the webservers group. If you are doing this in a template, you
could use the Jinja2 '#set' directive to simplify this, or in a playbook, you could also use set_fact::
- set_fact: headnode={{ groups[['webservers'][0]] }}
- set_fact: headnode={{ groups['webservers'][0] }}
- debug: msg={{ hostvars[headnode].ansible_eth0.ipv4.address }}