<liclass="toctree-l3"><aclass="reference internal"href="playbooks.html#include-files-and-reuse">Include Files And Reuse</a></li>
<liclass="toctree-l3"><aclass="reference internal"href="playbooks.html#using-includes-to-assign-classes-of-systems">Using Includes To Assign Classes of Systems</a></li>
@ -362,7 +361,7 @@ Puppet Labs, and rPath. Reach Michael by email <a class="reference external" hr
<pclass="pull-right"><ahref="#">Back to top</a></p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>ansible-playbook</title><linkrel="stylesheet"href="./docbook-xsl.css"type="text/css"/><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"/></head><body><divxml:lang="en"class="refentry"title="ansible-playbook"lang="en"><aid="id354228"></a><divclass="titlepage"></div><divclass="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><divclass="refsynopsisdiv"title="Synopsis"><aid="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook <filename.yml> … [options]</p></div><divclass="refsect1"title="DESCRIPTION"><aid="_description"></a><h2>DESCRIPTION</h2><p><spanclass="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment system. Ansible-playbook is the tool
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>ansible-playbook</title><linkrel="stylesheet"href="./docbook-xsl.css"type="text/css"/><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"/></head><body><divxml:lang="en"class="refentry"title="ansible-playbook"lang="en"><aid="id527421"></a><divclass="titlepage"></div><divclass="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><divclass="refsynopsisdiv"title="Synopsis"><aid="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook <filename.yml> … [options]</p></div><divclass="refsect1"title="DESCRIPTION"><aid="_description"></a><h2>DESCRIPTION</h2><p><spanclass="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment system. Ansible-playbook is the tool
used to run them. See the project home page (link below) for more information.</p></div><divclass="refsect1"title="ARGUMENTS"><aid="_arguments"></a><h2>ARGUMENTS</h2><divclass="variablelist"><dl><dt><spanclass="term">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>ansible</title><linkrel="stylesheet"href="./docbook-xsl.css"type="text/css"/><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"/></head><body><divxml:lang="en"class="refentry"title="ansible"lang="en"><aid="id351020"></a><divclass="titlepage"></div><divclass="refnamediv"><h2>Name</h2><p>ansible — run a command somewhere else</p></div><divclass="refsynopsisdiv"title="Synopsis"><aid="_synopsis"></a><h2>Synopsis</h2><p>ansible <host-pattern> [-f forks] [-m module_name] [-a args]</p></div><divclass="refsect1"title="DESCRIPTION"><aid="_description"></a><h2>DESCRIPTION</h2><p><spanclass="strong"><strong>Ansible</strong></span> is an extra-simple tool/framework/API for doing 'remote things' over
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>ansible</title><linkrel="stylesheet"href="./docbook-xsl.css"type="text/css"/><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"/></head><body><divxml:lang="en"class="refentry"title="ansible"lang="en"><aid="id389386"></a><divclass="titlepage"></div><divclass="refnamediv"><h2>Name</h2><p>ansible — run a command somewhere else</p></div><divclass="refsynopsisdiv"title="Synopsis"><aid="_synopsis"></a><h2>Synopsis</h2><p>ansible <host-pattern> [-f forks] [-m module_name] [-a args]</p></div><divclass="refsect1"title="DESCRIPTION"><aid="_description"></a><h2>DESCRIPTION</h2><p><spanclass="strong"><strong>Ansible</strong></span> is an extra-simple tool/framework/API for doing 'remote things' over
<li><aclass="reference internal"href="#include-files-and-reuse">Include Files And Reuse</a></li>
<li><aclass="reference internal"href="#using-includes-to-assign-classes-of-systems">Using Includes To Assign Classes of Systems</a></li>
@ -222,32 +221,42 @@ server group, then more commands back on the webservers group, etc.</p>
</div>
<divclass="section"id="basics">
<h2>Basics<aclass="headerlink"href="#basics"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="hosts-line">
<h3>Hosts line<aclass="headerlink"href="#hosts-line"title="Permalink to this headline">¶</a></h3>
<divclass="section"id="hosts-and-users">
<h3>Hosts and Users<aclass="headerlink"href="#hosts-and-users"title="Permalink to this headline">¶</a></h3>
<p>For each play in a playbook, you get to choose which machines in your infrastructure
to target and what remote user to complete the steps (called tasks) as.</p>
<p>The <cite>hosts</cite> line is a list of one or more groups or host patterns,
separated by colons, as described in the <aclass="reference internal"href="patterns.html#patterns"><em>The Inventory File, Patterns, and Groups</em></a>
documentation. This is just like the first parameter to
<cite>/usr/bin/ansible</cite>.</p>
<p>Each play gets to designate it’s own choice of patterns.</p>
</div>
<divclass="section"id="user-line">
<h3>User line<aclass="headerlink"href="#user-line"title="Permalink to this headline">¶</a></h3>
<p>Playbook steps on the remote system can be executed as any user. The default is root,
but you can specify others. Sudo support is pending.:</p>
documentation. The <cite>user</cite> is just the name of the user account:</p>
<divclass="highlight-python"><pre>---
- hosts: webservers
user: root</pre>
</div>
<p>Support for running things from sudo is pending.</p>
</div>
<divclass="section"id="vars-section">
<h3>Vars section<aclass="headerlink"href="#vars-section"title="Permalink to this headline">¶</a></h3>
<p>The <cite>vars’ section contains a list of variables and values that can be used in the plays. These
can be used in templates or tasks and are dereferenced using
`jinja2</cite> syntax like this:</p>
<p>The <ahref="#id1"><spanclass="problematic"id="id2">`</span></a>vars’ section contains a list of variables and values that can be used in the plays, like this:</p>
<divclass="highlight-python"><pre>---
- hosts: webservers
users: root
vars:
http_port: 80
van_halen_port: 5150
other: 'magic'</pre>
</div>
<p>These variables can be used later in the playbook, or on the managed system (in templates), just like this:</p>