1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Document with_items

This commit is contained in:
Michael DeHaan 2012-04-17 20:04:24 -04:00
parent 85f0ff2572
commit 4f95dacee1
4 changed files with 24 additions and 1 deletions

View file

@ -323,6 +323,7 @@ Email: <input type=text name=email>&nbsp;&nbsp;<input type=submit name="sub" val
<li class="toctree-l3"><a class="reference internal" href="playbooks.html#conditional-imports">Conditional Imports</a></li>
<li class="toctree-l3"><a class="reference internal" href="playbooks.html#include-files-and-reuse">Include Files And Reuse</a></li>
<li class="toctree-l3"><a class="reference internal" href="playbooks.html#using-includes-to-assign-classes-of-systems">Using Includes To Assign Classes of Systems</a></li>
<li class="toctree-l3"><a class="reference internal" href="playbooks.html#loop-shorthand">Loop Shorthand</a></li>
<li class="toctree-l3"><a class="reference internal" href="playbooks.html#asynchronous-actions-and-polling">Asynchronous Actions and Polling</a></li>
</ul>
</li>

View file

@ -144,6 +144,7 @@ s.parentNode.insertBefore(ga, s);
<li><a class="reference internal" href="#conditional-imports">Conditional Imports</a></li>
<li><a class="reference internal" href="#include-files-and-reuse">Include Files And Reuse</a></li>
<li><a class="reference internal" href="#using-includes-to-assign-classes-of-systems">Using Includes To Assign Classes of Systems</a></li>
<li><a class="reference internal" href="#loop-shorthand">Loop Shorthand</a></li>
<li><a class="reference internal" href="#asynchronous-actions-and-polling">Asynchronous Actions and Polling</a></li>
</ul>
</li>
@ -574,6 +575,16 @@ similar to model a push process for a multi-tier web application. This is
actually one of the things playbooks were invented to do.</p>
</div>
</div>
<div class="section" id="loop-shorthand">
<h3>Loop Shorthand<a class="headerlink" href="#loop-shorthand" title="Permalink to this headline"></a></h3>
<p>To save some typing, repeated tasks can be written in short-hand like so:</p>
<div class="highlight-python"><pre>- name: add user $item
action: user name=$item state=present groups=wheel
with_items:
- testuser1
- testuser2</pre>
</div>
</div>
<div class="section" id="asynchronous-actions-and-polling">
<h3>Asynchronous Actions and Polling<a class="headerlink" href="#asynchronous-actions-and-polling" title="Permalink to this headline"></a></h3>
<p>By default tasks in playbooks block, meaning the connections stay open

View file

@ -475,6 +475,17 @@ customize it depending on what class or nature of machines they are.
similar to model a push process for a multi-tier web application. This is
actually one of the things playbooks were invented to do.
Loop Shorthand
++++++++++++++
To save some typing, repeated tasks can be written in short-hand like so::
- name: add user $item
action: user name=$item state=present groups=wheel
with_items:
- testuser1
- testuser2
Asynchronous Actions and Polling
++++++++++++++++++++++++++++++++

File diff suppressed because one or more lines are too long