<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.7 (devel <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/6bc056e012b94bc58295a18355b0f6a8f7b076f6/hovercard" href="https://github.com/ansible/ansible/commit/6bc056e012b94bc58295a18355b0f6a8f7b076f6"><tt>6bc056e</tt></a>) last updated 2014/06/02 19:46:03 (GMT -700)</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Mac OS X 10.9.3</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Subsequent dependent roles are ignored when a role containing the dependency is conditionally skipped and the dependency is marked <code class="notranslate">allow_duplicates: no</code>.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Playbook contains:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="roles:
    - { role: role_a, when: false }
    - role_b"><pre class="notranslate"><code class="notranslate">roles:
    - { role: role_a, when: false }
    - role_b
</code></pre></div>
<p dir="auto"><code class="notranslate">role_a</code> and <code class="notranslate">role_b</code> have dependencies in <code class="notranslate">meta/main.yml</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
  - role_c"><pre class="notranslate"><code class="notranslate">dependencies:
  - role_c
</code></pre></div>
<p dir="auto"><code class="notranslate">role_c</code> disables duplicates in <code class="notranslate">meta/main.yml</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="allow_duplicates: no"><pre class="notranslate"><code class="notranslate">allow_duplicates: no
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<ol dir="auto">
<li><code class="notranslate">role_c</code> is skipped, <code class="notranslate">role_a</code> is skipped.</li>
<li><code class="notranslate">role_c</code> executes as a dependency of <code class="notranslate">role_b</code></li>
<li><code class="notranslate">role_b</code> executes.</li>
</ol>
<h5 dir="auto">Actual Results:</h5>
<ol dir="auto">
<li><code class="notranslate">role_c</code> is skipped, <code class="notranslate">role_a</code> is skipped.</li>
<li><code class="notranslate">role_b</code> executes, but <code class="notranslate">role_c</code> dependency is never satisfied.</li>
</ol>
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">master</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">If a role dependency is skipped, via:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
---
dependencies:
  - { role: foo, when: false }"><pre class="notranslate">---
<span class="pl-ent">dependencies</span>:
  - <span class="pl-s">{ role: foo, when: false }</span></pre></div>
<p dir="auto">Then it's children are also skipped, even if they are required by other roles.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/foo/meta/main.yml

---
dependencies:
  - { role: child, when: false }"><pre class="notranslate"><code class="notranslate"># roles/foo/meta/main.yml

---
dependencies:
  - { role: child, when: false }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/bar/meta/main.yml

---
dependencies:
  - { role: child }"><pre class="notranslate"><code class="notranslate"># roles/bar/meta/main.yml

---
dependencies:
  - { role: child }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/parent/meta/main.yml

---
dependencies:
  - { role: foo }
  - { role: bar }"><pre class="notranslate"><code class="notranslate"># roles/parent/meta/main.yml

---
dependencies:
  - { role: foo }
  - { role: bar }
</code></pre></div>
<p dir="auto">If the <em>parent</em> role is used, then <em>child</em> will never be executed.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Roles are re-run if required by subsequent roles, and have not been run already (under no-duplicate roles policy).</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Role is skipped for the rest of the play.</p>