<p dir="auto">If a playbook is written to include a dependency role explicitly, that role can be loaded more than once if another role depends on it. Consider this example. <code class="notranslate">base</code> is a role with no dependencies. <code class="notranslate">feature</code> is a role with a meta/main.yml file specifying the <code class="notranslate">base</code> role as a dependency. <code class="notranslate">base</code> will be run twice by default here.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: name
  roles:
    - base
    - feature"><pre class="notranslate"><code class="notranslate">- name: name
  roles:
    - base
    - feature
</code></pre></div>
<p dir="auto">The docs say "by default, roles can also only be added as a dependency once" and technically that is true, <code class="notranslate">base</code> is loaded once as an explicit module and once as a dependency module. Still, I argue that this behavior should be improved to "by default, roles are added only once" to be more consistent with typical dependency management systems and associated expectations. When <code class="notranslate">feature</code> is run, it should be known that the <code class="notranslate">base</code> dependency has already run.</p>
<p dir="auto">As a system administrator I want to install build dependency packages for developer and buildhost machines using the same syntax I install normal packages with.</p>
<p dir="auto">It would be useful if one could install build-deps via the apt module instead of mixing and matching apt module and commands for "apt-get build-dep "</p>