<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">core</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.1.0
config file =
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.1.0
config file =
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">We recently had a change submitted to the triple-quickstart project<br>
that contained the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Rebuild inventory
  hosts: localhost
  roles:
    - rebuild-inventory
  tags:
    - provision
# check the target virthost distro for RHEL or CentOS
  hosts: virthost
  roles:
    - provision/support_check
  tags:
    - provision"><pre class="notranslate"><code class="notranslate">- name: Rebuild inventory
  hosts: localhost
  roles:
    - rebuild-inventory
  tags:
    - provision
# check the target virthost distro for RHEL or CentOS
  hosts: virthost
  roles:
    - provision/support_check
  tags:
    - provision
</code></pre></div>
<p dir="auto">Note that the second task list is missing the YAML list marker; it<br>
should look like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: virthost
  roles:
    - provision/support_check
  tags:
    - provision"><pre class="notranslate"><code class="notranslate">- hosts: virthost
  roles:
    - provision/support_check
  tags:
    - provision
</code></pre></div>
<p dir="auto">This is a clear error, but it passes through the YAML parser with only<br>
the following warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[WARNING]: While constructing a mapping from /home/lars/src/tripleo-
quickstart/playbooks/provision.yml, line 21, column 3, found a
duplicate dict key (roles).  Using last defined value only."><pre class="notranslate"><code class="notranslate">[WARNING]: While constructing a mapping from /home/lars/src/tripleo-
quickstart/playbooks/provision.yml, line 21, column 3, found a
duplicate dict key (roles).  Using last defined value only.
</code></pre></div>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">(see above playbook samples)</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Since duplicate keys are in fact not possible, I would expect Ansible<br>
to abort with an error at this point.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Ansible ignores the error and continues on its merry way.<br>
Because this warning comes from deep within the parser, it's not even<br>
possible for something like <code class="notranslate">ansible-lint</code> to catch the problem,<br>
either.</p>
<h5 dir="auto">ADDITIONAL COMMENTARY</h5>
<p dir="auto">This is, oddly enough, the exact opposite of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123004180" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/13603" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/13603/hovercard" href="https://github.com/ansible/ansible/issues/13603">#13603</a>.</p>
<p dir="auto">The unarchive module supports --diff for tar.gz files, which is great. Unfortunately this always fails when specifying a sudo_user for the task, since tar reports an altered uid/gid.</p>