diff --git a/docsite/rst/playbooks_loops.rst b/docsite/rst/playbooks_loops.rst index a56af0b713..eaad679c51 100644 --- a/docsite/rst/playbooks_loops.rst +++ b/docsite/rst/playbooks_loops.rst @@ -556,7 +556,7 @@ Ansible by default sets the loop variable `item` for each loop, which causes the As of Ansible 2.1, the `loop_control` option can be used to specify the name of the variable to be used for the loop:: # main.yml - - include: test.yml outer_loop="{{ outer_item }}" + - include: inner.yml with_items: - 1 - 2 @@ -565,7 +565,7 @@ As of Ansible 2.1, the `loop_control` option can be used to specify the name of loop_var: outer_item # inner.yml - - debug: msg="outer item={{ outer_loop }} inner item={{ item }}" + - debug: msg="outer item={{ outer_item }} inner item={{ item }}" with_items: - a - b @@ -583,7 +583,7 @@ Because `loop_control` is not available in Ansible 2.0, when using an include wi for `item`:: # main.yml - - include: test.yml + - include: inner.yml with_items: - 1 - 2