From c16c527923cfe3f67e981a8de330cbd248dd3226 Mon Sep 17 00:00:00 2001 From: Juri Glass Date: Thu, 23 Oct 2014 16:42:10 +0200 Subject: [PATCH 1/2] Update playbooks_variables.rst There is some kind of duplicated content with http://docs.ansible.com/faq.html#how-do-i-loop-over-a-list-of-hosts-in-a-group-inside-of-a-template and this gotcha isn't listed here. --- docsite/rst/playbooks_variables.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 86146cdd0f..b552352932 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -842,6 +842,7 @@ A frequently used idiom is walking a group to find all IP addresses in that grou {% endfor %} An example of this could include pointing a frontend proxy server to all of the app servers, setting up the correct firewall rules between servers, etc. +You need to make sure that the facts of those hosts have been populated before though, for example by running a play against them. Additionally, *inventory_hostname* is the name of the hostname as configured in Ansible's inventory host file. This can be useful for when you don't want to rely on the discovered hostname `ansible_hostname` or for other mysterious From 9974ba01e3922ac2b9ff27e8b09166e7d916ae46 Mon Sep 17 00:00:00 2001 From: Juri Glass Date: Tue, 28 Oct 2014 11:18:32 +0100 Subject: [PATCH 2/2] added fact caching hint --- docsite/rst/playbooks_variables.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index b552352932..340744f419 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -842,7 +842,7 @@ A frequently used idiom is walking a group to find all IP addresses in that grou {% endfor %} An example of this could include pointing a frontend proxy server to all of the app servers, setting up the correct firewall rules between servers, etc. -You need to make sure that the facts of those hosts have been populated before though, for example by running a play against them. +You need to make sure that the facts of those hosts have been populated before though, for example by running a play against them if the facts have not been cached recently (fact caching was added in Ansible 1.8). Additionally, *inventory_hostname* is the name of the hostname as configured in Ansible's inventory host file. This can be useful for when you don't want to rely on the discovered hostname `ansible_hostname` or for other mysterious