<p dir="auto">There is a defect in the cron module when running on SuSE and other distributions that add a header, three lines, to the user crontab file. Each call to add/remove a job includes the previous header. After adding the code to strip the header, I created a test suite outside ansible and found other problems with the handling empty jobs and cron files. I should be able to cleanup my changes and generate a pull request over the weekend.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto"><code class="notranslate">template</code> module(action plugin)</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Default config</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Jinja2 templates can't be included between roles in 2.2.1</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Make two roles: <code class="notranslate">common_role</code>, <code class="notranslate">service_role</code>.<br>
Make template in <code class="notranslate">common_role/templates/common.j2</code>.<br>
Make template in <code class="notranslate">service_role/templates/service.j2</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="This is a service
{% include 'common_role/templates/common.j2' %}"><pre class="notranslate"><code class="notranslate">This is a service
{% include 'common_role/templates/common.j2' %}
</code></pre></div>
<p dir="auto">Trying to template <code class="notranslate">service.j2</code> will fail with error:</p>
<blockquote>
<p dir="auto">TemplateNotFound: common_role/templates/common.j2</p>
</blockquote>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto"><code class="notranslate">service.j2</code> should include <code class="notranslate">common.j2</code> while rendering.</p>
<h5 dir="auto">DETAILS</h5>
<p dir="auto">This happens because <code class="notranslate">/path/to/project/roles</code> is not included in search path any more.<br>
<a href="https://github.com/ansible/ansible/commit/f90a6439c41c345f48ea4187278ba39dbdb182e3">Commit</a> with braking changes.</p>
<p dir="auto">Original behaviour has been done <a href="https://github.com/ansible/ansible/commit/dbd755e0f45d157ddf6326252043fa60f7ee80e7">here</a> and patched a bit <a href="https://github.com/ansible/ansible/commit/f162990cb3677ad19c138a8700c39e5e656cfd81">here</a>.</p>
<p dir="auto">This allow to include templates between roles, because Jinja2 blocks include paths with <code class="notranslate">..</code>.</p>