From 967e05bb2358d2c17ea4e780ccebdf208ba62fc5 Mon Sep 17 00:00:00 2001 From: Fedor V Date: Tue, 24 Mar 2020 11:03:08 +0300 Subject: [PATCH] DOC fix: typo in group addressing syntax (#67994) --- docs/docsite/rst/reference_appendices/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docsite/rst/reference_appendices/faq.rst b/docs/docsite/rst/reference_appendices/faq.rst index 20c8a03acdd..4b86366be00 100644 --- a/docs/docsite/rst/reference_appendices/faq.rst +++ b/docs/docsite/rst/reference_appendices/faq.rst @@ -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 }}