<h2>Bundling Ansible Modules With Playbooks<aclass="headerlink"href="#bundling-ansible-modules-with-playbooks"title="Permalink to this headline">¶</a></h2>
<h2>Bundling Ansible Modules With Playbooks<aclass="headerlink"href="#bundling-ansible-modules-with-playbooks"title="Permalink to this headline">¶</a></h2>
<p>In version 0.5 and later, if a playbook has a ”./library” directory relative to it’s YAML file, this directory can be used to add ansible modules that will automatically be in the ansible module path. This is a great way to keep modules that
<pclass="versionadded">
go with a playbook together.</p>
<spanclass="versionmodified">New in version 0.5.</span></p>
<p>If a playbook has a ”./library” directory relative to it’s YAML file,
this directory can be used to add ansible modules that will
automatically be in the ansible module path. This is a great way to
keep modules that go with a playbook together.</p>
</div>
</div>
<divclass="section"id="miscellaneous-tips">
<divclass="section"id="miscellaneous-tips">
<h2>Miscellaneous Tips<aclass="headerlink"href="#miscellaneous-tips"title="Permalink to this headline">¶</a></h2>
<h2>Miscellaneous Tips<aclass="headerlink"href="#miscellaneous-tips"title="Permalink to this headline">¶</a></h2>
<h2>Splitting Out Host and Group Specific Data<aclass="headerlink"href="#splitting-out-host-and-group-specific-data"title="Permalink to this headline">¶</a></h2>
<h2>Splitting Out Host and Group Specific Data<aclass="headerlink"href="#splitting-out-host-and-group-specific-data"title="Permalink to this headline">¶</a></h2>
<p>In Ansible 0.6 and later, in addition to the storing variables directly in the INI file, host and
<pclass="versionadded">
group variables can be stored in individual files relative to the inventory file. These
<spanclass="versionmodified">New in version 0.6.</span></p>
variable files are in YAML format.</p>
<p>In addition to the storing variables directly in the INI file, host
and group variables can be stored in individual files relative to the
inventory file. These variable files are in YAML format.</p>
<p>It is ok if these files do not exist, this is an optional feature.</p>
<p>It is ok if these files do not exist, this is an optional feature.</p>
<p>Tip: Keeping your inventory file and variables in a git repo (or other version control)
<p>Tip: Keeping your inventory file and variables in a git repo (or other version control)
is an excellent way to track changes to your inventory and host variables.</p>
is an excellent way to track changes to your inventory and host variables.</p>
<p>Tip: If you ever have two python interpreters on a system, set a variable called ‘ansible_python_interpreter’ to
<pclass="versionadded">
the Python interpreter path you would like to use.</p>
<spanclass="versionmodified">New in version 0.5: </span>If you ever have two python interpreters on a system, set a
variable called ‘ansible_python_interpreter’ to the Python
interpreter path you would like to use.</p>
</div>
</div>
<divclass="section"id="yaml-inventory">
<divclass="section"id="yaml-inventory">
<h2>YAML Inventory<aclass="headerlink"href="#yaml-inventory"title="Permalink to this headline">¶</a></h2>
<h2>YAML Inventory<aclass="headerlink"href="#yaml-inventory"title="Permalink to this headline">¶</a></h2>
<p>Ansible’s YAML inventory format is deprecated and will be removed in Ansible 0.7. Ansible 0.6 includes
<pclass="deprecated">
a <aclass="reference external"href="https://github.com/ansible/ansible/blob/devel/examples/scripts/yaml_to_ini.py">conversion script</a>.</p>
<spanclass="versionmodified">Deprecated since version 0.7.</span></p>
<p>Ansible’s YAML inventory format is deprecated and will be removed in
Ansible 0.7. Ansible 0.6 includes a <aclass="reference external"href="https://github.com/ansible/ansible/blob/devel/examples/scripts/yaml_to_ini.py">conversion script</a>.</p>