diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index a4b73b7b80..727f4fb150 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -174,7 +174,9 @@ How do I loop over a list of hosts in a group, inside of a template? ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A pretty common pattern is to iterate over a list of hosts inside of a host group, perhaps to populate a template configuration -file with a list of servers. To do this, you can just access the "$groups" dictionary in your template, like this:: +file with a list of servers. To do this, you can just access the "$groups" dictionary in your template, like this: + +.. code-block:: jinja2 {% for host in groups['db_servers'] %} {{ host }} @@ -184,7 +186,7 @@ If you need to access facts about these hosts, for instance, the IP address of e - hosts: db_servers tasks: - - # doesn't matter what you do, just that they were talked to previously. + - debug: msg="doesn't matter what you do, just that they were talked to previously." Then you can use the facts inside your template, like this:: diff --git a/docsite/rst/intro_configuration.rst b/docsite/rst/intro_configuration.rst index a42d7be73c..4272ef7fb9 100644 --- a/docsite/rst/intro_configuration.rst +++ b/docsite/rst/intro_configuration.rst @@ -228,7 +228,7 @@ Allows disabling of deprecating warnings in ansible-playbook output:: Deprecation warnings indicate usage of legacy features that are slated for removal in a future release of Ansible. -.. _display_args_to_stdout +.. _display_args_to_stdout: display_args_to_stdout ====================== @@ -768,7 +768,7 @@ instead. Setting it to False will improve performance and is recommended when h record_host_keys=True -.. _paramiko_proxy_command +.. _paramiko_proxy_command: proxy_command ============= diff --git a/docsite/rst/playbooks_advanced_syntax.rst b/docsite/rst/playbooks_advanced_syntax.rst index 932cfc87b9..930f923952 100644 --- a/docsite/rst/playbooks_advanced_syntax.rst +++ b/docsite/rst/playbooks_advanced_syntax.rst @@ -5,14 +5,14 @@ Advanced Syntax This page describes advanced YAML syntax that enables you to have more control over the data placed in YAML files used by Ansible. -.. _yaml_tags_and_python_types +.. _yaml_tags_and_python_types: YAML tags and Python types `````````````````````````` The documentation covered here is an extension of the documentation that can be found in the `PyYAML Documentation `_ -.. _unsafe_strings +.. _unsafe_strings: Unsafe or Raw Strings ~~~~~~~~~~~~~~~~~~~~~ diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 07b71c64fe..22be4abeef 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -936,7 +936,7 @@ how all of these things can work together. Advanced Syntax ``````````````` -For information about advanced YAML syntax used to declare variables and have more control over the data placed in YAML files used by Ansible, see `playbooks_advanced_syntax`_ +For information about advanced YAML syntax used to declare variables and have more control over the data placed in YAML files used by Ansible, see `:doc:playbooks_advanced_syntax` .. seealso:: diff --git a/docsite/rst/porting_guide_2.0.rst b/docsite/rst/porting_guide_2.0.rst index e7b0f2146e..8c95c9a4d0 100644 --- a/docsite/rst/porting_guide_2.0.rst +++ b/docsite/rst/porting_guide_2.0.rst @@ -163,6 +163,7 @@ Here are some corner cases encountered when updating, these are mostly caused by - task: dostuf becom: yes + The task always ran without using privilege escalation (for that you need `become`) but was also silently ignored so the play 'ran' even though it should not, now this is a parsing error.