<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">The --limit option</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.0 (devel ba3295dd3f) last updated 2017/04/12 11:26:36 (GMT +200)"><pre class="notranslate"><code class="notranslate">ansible 2.4.0 (devel ba3295dd3f) last updated 2017/04/12 11:26:36 (GMT +200)
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">One of our developer tried to use one of our playbooks using multiple limits, thinking it will behave like a <code class="notranslate">:&amp;</code> pattern. Having something like:</p>
<p dir="auto"><code class="notranslate">ansible-playbook deploy.yml --limit foo --limit bar</code></p>
<p dir="auto">The limit on <code class="notranslate">foo</code> was omitted without any warning/error message prompted.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ansible-playbook deploy.yml --limit foo --limit bar --list-hosts
# The output will only contain hosts from *bar* group
$ ansible-playbook deploy.yml --limit &quot;foo:&amp;bar&quot; --list-hosts
# The output will contain hosts contained in both foo and bar groups"><pre class="notranslate"><span class="pl-s">$ ansible-playbook deploy.yml --limit foo --limit bar --list-hosts</span>
<span class="pl-c"><span class="pl-c">#</span> The output will only contain hosts from *bar* group</span>
<span class="pl-s">$ ansible-playbook deploy.yml --limit "foo:&amp;bar" --list-hosts</span>
<span class="pl-c"><span class="pl-c">#</span> The output will contain hosts contained in both foo and bar groups</span></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">I think that ansible should, at least, print a warning to mention that one of the <em>--limit</em> will be omitted</p>
<h5 dir="auto">ACTUAL RESULTS</h5>


<p dir="auto">The playbook was run on hosts from the group mentioned in the second <em>limit</em>.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">systemd</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.0
  config file = /home/sxpert/.ansible.cfg
  configured module search path = [u'/home/sxpert/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0
  config file = /home/sxpert/.ansible.cfg
  configured module search path = [u'/home/sxpert/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
</code></pre></div>
<p dir="auto">The documentation of the systemd module states that one should be able to do :</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: &quot;restart systemd&quot;
  systemd:
    daemon_reload: &quot;yes&quot;
  become: &quot;yes&quot;"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>restart systemd<span class="pl-pds">"</span></span>
  <span class="pl-ent">systemd</span>:
    <span class="pl-ent">daemon_reload</span>: <span class="pl-s"><span class="pl-pds">"</span>yes<span class="pl-pds">"</span></span>
  <span class="pl-ent">become</span>: <span class="pl-s"><span class="pl-pds">"</span>yes<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">yet, when one does this, the following error occurs :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [testvm]: FAILED! =&gt; {
  &quot;changed&quot;: false, 
  &quot;failed&quot;: true, 
  &quot;msg&quot;: &quot;name is also required when specifying state&quot;
}"><pre class="notranslate"><code class="notranslate">fatal: [testvm]: FAILED! =&gt; {
  "changed": false, 
  "failed": true, 
  "msg": "name is also required when specifying state"
}
</code></pre></div>
<p dir="auto">so, which one is it ?</p>