<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">aync</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ansible --version
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
"><pre class="notranslate"><code class="notranslate"> ansible --version
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]

</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

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

<p dir="auto">Ubuntu 14.04</p>
<h5 dir="auto">SUMMARY</h5>

<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="- hosts: localhost
  name: 'async statu does not stop'  
  gather_facts: no  
  tasks:  
    - shell: sleep 30000
      async: 10
      poll: 0
      register: job
      
    - async_status: jid=&quot;{{job.ansible_job_id}}&quot; 
      register: job_result
      until: job_result.finished
      retries: 500
      delay: 5  
"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
  <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">'</span>async statu does not stop<span class="pl-pds">'</span></span>  
  <span class="pl-ent">gather_facts</span>: <span class="pl-s">no  </span>
  <span class="pl-ent">tasks</span>:  
    - <span class="pl-ent">shell</span>: <span class="pl-s">sleep 30000</span>
      <span class="pl-ent">async</span>: <span class="pl-c1">10</span>
      <span class="pl-ent">poll</span>: <span class="pl-c1">0</span>
      <span class="pl-ent">register</span>: <span class="pl-s">job</span>
      
    - <span class="pl-ent">async_status</span>: <span class="pl-s">jid="{{job.ansible_job_id}}" </span>
      <span class="pl-ent">register</span>: <span class="pl-s">job_result</span>
      <span class="pl-ent">until</span>: <span class="pl-s">job_result.finished</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">500</span>
      <span class="pl-ent">delay</span>: <span class="pl-c1">5</span>  
</pre></div>

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

<p dir="auto">In case the async job times out the async_status task needs to stop</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">async_status task keeps looping till it exhaust the retries</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /home/seb/hgdata/sfdc-ops/ansible/ansible.cfg as config file

PLAY [async statu does not stop] ****************************************************************************************************************************************************************************

TASK [command] **********************************************************************************************************************************************************************************************
changed: [localhost] =&gt; {&quot;ansible_job_id&quot;: &quot;6215717693.6129&quot;, &quot;changed&quot;: true, &quot;finished&quot;: 0, &quot;results_file&quot;: &quot;/home/seb/.ansible_async/6215717693.6129&quot;, &quot;started&quot;: 1}

TASK [async_status] *****************************************************************************************************************************************************************************************
FAILED - RETRYING: async_status (500 retries left).
FAILED - RETRYING: async_status (499 retries left).
FAILED - RETRYING: async_status (498 retries left).
FAILED - RETRYING: async_status (497 retries left).
FAILED - RETRYING: async_status (496 retries left).
FAILED - RETRYING: async_status (495 retries left).
FAILED - RETRYING: async_status (494 retries left).
FAILED - RETRYING: async_status (493 retries left).
^C [ERROR]: User interrupted execution

seb@seb:~/hgdata/sfdc-ops/scripts$ cat /home/seb/.ansible_async/6215717693.6129
{&quot;started&quot;: 1, &quot;finished&quot;: 0, &quot;ansible_job_id&quot;: &quot;6215717693.6129&quot;}seb@seb:~/hgdata/sfdc-ops/scripts$ 
"><pre class="notranslate"><code class="notranslate">Using /home/seb/hgdata/sfdc-ops/ansible/ansible.cfg as config file

PLAY [async statu does not stop] ****************************************************************************************************************************************************************************

TASK [command] **********************************************************************************************************************************************************************************************
changed: [localhost] =&gt; {"ansible_job_id": "6215717693.6129", "changed": true, "finished": 0, "results_file": "/home/seb/.ansible_async/6215717693.6129", "started": 1}

TASK [async_status] *****************************************************************************************************************************************************************************************
FAILED - RETRYING: async_status (500 retries left).
FAILED - RETRYING: async_status (499 retries left).
FAILED - RETRYING: async_status (498 retries left).
FAILED - RETRYING: async_status (497 retries left).
FAILED - RETRYING: async_status (496 retries left).
FAILED - RETRYING: async_status (495 retries left).
FAILED - RETRYING: async_status (494 retries left).
FAILED - RETRYING: async_status (493 retries left).
^C [ERROR]: User interrupted execution

seb@seb:~/hgdata/sfdc-ops/scripts$ cat /home/seb/.ansible_async/6215717693.6129
{"started": 1, "finished": 0, "ansible_job_id": "6215717693.6129"}seb@seb:~/hgdata/sfdc-ops/scripts$ 

</code></pre></div>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">LVM fact gathering</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/guru/docker/ansible.cfg
  configured module search path = [u'/home/guru/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
"><pre class="notranslate"><code class="notranslate">ansible 2.4.0
  config file = /home/guru/docker/ansible.cfg
  configured module search path = [u'/home/guru/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">defaults</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">The hash produced by fact gathering for ansible_lvm uses the LV name as the key, but you can have multiple LV's on a system with the exact same name. In this case, only the last LV discovered is shown in the hash.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Create LVs with same name in different VGs. for example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# lvs
  LV         VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  demo       vg0 -wi-ao----   1.00g
  demo       vg1 -wi-a----- 248.00m
# ansible localhost -m setup
...snip...
&quot;ansible_lvm&quot;: {
   &quot;lvs&quot;: {
       &quot;demo&quot;: {
           &quot;size_g&quot;: &quot;0.24&quot;,
           &quot;vg&quot;: &quot;vg1&quot;
       }"><pre class="notranslate"><code class="notranslate"># lvs
  LV         VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  demo       vg0 -wi-ao----   1.00g
  demo       vg1 -wi-a----- 248.00m
# ansible localhost -m setup
...snip...
"ansible_lvm": {
   "lvs": {
       "demo": {
           "size_g": "0.24",
           "vg": "vg1"
       }
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Given data structure I guess the most I could hope for is an error. What I need is for both LVs to be listed even though they have the same name. Not sure how the LVM facts section could best be refactored to support this...</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Only the last LV seen is shown, the other(s) become invisible.</p>