<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ansible-2.18 on C2 Platform</title><link>https://next.c2platform.org/tags/ansible-2.18/</link><description>Recent content in Ansible-2.18 on C2 Platform</description><generator>Hugo</generator><language>en</language><atom:link href="https://next.c2platform.org/tags/ansible-2.18/index.xml" rel="self" type="application/rss+xml"/><item><title>Pass Variables Explicitly to included Roles from Ansible 2.18</title><link>https://next.c2platform.org/docs/guidelines/coding/include-role/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://next.c2platform.org/docs/guidelines/coding/include-role/</guid><description>&lt;div class="alert alert-primary" role="alert">


 From Ansible Core 2.18, a role included via &lt;code>ansible.builtin.include_role&lt;/code> or
&lt;code>ansible.builtin.import_role&lt;/code> no longer sees the &lt;code>defaults/&lt;/code> and &lt;code>vars/&lt;/code> of the
calling role automatically. Pass every variable that the included role needs but
does not own explicitly, via &lt;code>vars:&lt;/code> on the include task. This includes
dictionaries that contain Jinja templates, such as certificate configurations,
and public configuration variables of the included role.

&lt;/div>

&lt;h2 id="problem">Problem&lt;/h2>
&lt;p>Implicit variable visibility between a calling role and an included role used to
make some integrations look simple, but it hid the real contract. Under Ansible
2.18 that implicit visibility is gone, so three failure modes appear:&lt;/p></description></item></channel></rss>