<p dir="auto">ansible 2.0.0.2</p>
<p dir="auto">Run against a set of tasks like so:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Duplicate
  debug: msg=&quot;hi&quot;

- name: Duplicate
  command: sleep 100"><pre class="notranslate"><code class="notranslate">- name: Duplicate
  debug: msg="hi"

- name: Duplicate
  command: sleep 100
</code></pre></div>
<p dir="auto">You'll notice you only get timing on one. This is flaw in the core architecture of this plugin. It uses a dict to store values by task name it seems.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aioue/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aioue">@aioue</a></p>
<h5 dir="auto">ISSUE TYPE</h5>

<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  config file = /home/douglas/repos/ansible/ansible.cfg
  configured module search path = Default w/o overrides
"><pre lang="ansible" class="notranslate"><code class="notranslate">  config file = /home/douglas/repos/ansible/ansible.cfg
  configured module search path = Default w/o overrides

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

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

<h5 dir="auto">SUMMARY</h5>

<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
ansible-playbook accounts.yml --step -e hosts=localhost -e homedir=/boot -vvv -e user=foo
- name: get fs free space
  shell: df | grep {{ homedir }} | awk 'FNR == 2 { print $2 } '
  register: fsusage
- name: print fsusage in kb
  debug: var=fsusage.stdout_lines
- name: check existing homedir quota usage
  shell: w
  failed_when: &quot;'{{ item | int }}' &lt; '146800640'&quot;
  with_items: fsusage.stdout
"><pre class="notranslate"><code class="notranslate">
ansible-playbook accounts.yml --step -e hosts=localhost -e homedir=/boot -vvv -e user=foo
- name: get fs free space
  shell: df | grep {{ homedir }} | awk 'FNR == 2 { print $2 } '
  register: fsusage
- name: print fsusage in kb
  debug: var=fsusage.stdout_lines
- name: check existing homedir quota usage
  shell: w
  failed_when: "'{{ item | int }}' &lt; '146800640'"
  with_items: fsusage.stdout

</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">fsusage.stdout_lines is 523248 so task "check existing homedir quota usage" should fail given that value is less than 146800640</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
Task &quot; check existing homedir quota usage&quot; does not fail...

PLAYBOOK: accounts.yml *********************************************************
1 plays in accounts.yml

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
ok: [localhost]

TASK [accounts : include] ******************************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/main.yml:2
skipping: [localhost] =&gt; {&quot;changed&quot;: false, &quot;skip_reason&quot;: &quot;Conditional check failed&quot;, &quot;skipped&quot;: true}

TASK [accounts : include] ******************************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/main.yml:5
[DEPRECATION WARNING]: You should not specify tags in the include parameters. All tags should be specified using the task-level option.
This feature will be removed in a future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
included: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml for localhost

TASK [accounts : get fs free space] ********************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:4
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
changed: [localhost] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;df | grep /boot | awk 'FNR == 2 { print $2 } '&quot;, &quot;delta&quot;: &quot;0:00:00.003666&quot;, &quot;end&quot;: &quot;2016-06-15 13:55:11.982607&quot;, &quot;invocation&quot;: {&quot;module_args&quot;: {&quot;_raw_params&quot;: &quot;df | grep /boot | awk 'FNR == 2 { print $2 } '&quot;, &quot;_uses_shell&quot;: true, &quot;chdir&quot;: null, &quot;creates&quot;: null, &quot;executable&quot;: null, &quot;removes&quot;: null, &quot;warn&quot;: true}, &quot;module_name&quot;: &quot;command&quot;}, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-06-15 13:55:11.978941&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;523248&quot;, &quot;stdout_lines&quot;: [&quot;523248&quot;], &quot;warnings&quot;: []}

TASK [accounts : print fsusage in kb] ******************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:13
ok: [localhost] =&gt; {
    &quot;fsusage.stdout_lines&quot;: [
        &quot;523248&quot;
    ]
}

TASK [accounts : check existing homedir quota usage] ***************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:16
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{fsusage.stdout}}').
This feature will be removed in a future release. Deprecation warnings 
can be disabled by setting deprecation_warnings=False in ansible.cfg.
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
changed: [localhost] =&gt; (item=523248) =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;w&quot;, &quot;delta&quot;: &quot;0:00:00.012080&quot;, &quot;end&quot;: &quot;2016-06-15 13:55:12.160439&quot;, &quot;failed&quot;: false, &quot;failed_when_result&quot;: false, &quot;invocation&quot;: {&quot;module_args&quot;: {&quot;_raw_params&quot;: &quot;w&quot;, &quot;_uses_shell&quot;: true, &quot;chdir&quot;: null, &quot;creates&quot;: null, &quot;executable&quot;: null, &quot;removes&quot;: null, &quot;warn&quot;: true}, &quot;module_name&quot;: &quot;command&quot;}, &quot;item&quot;: &quot;523248&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-06-15 13:55:12.148359&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot; 13:55:12 up  2:46,  3 users,  load average: 0.35, 0.26, 0.24\nUSER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT\ndouglas  tty8     :0               11:09    2:46m  2:28   0.33s cinnamon-session --session cinnamon\ndouglas  pts/1    :0               12:31   16:00   0.06s  0.00s tmux attach -d\ndouglas  pts/8    :0               11:25    8.00s  5.40s  0.00s /bin/sh -c w&quot;, &quot;stdout_lines&quot;: [&quot; 13:55:12 up  2:46,  3 users,  load average: 0.35, 0.26, 0.24&quot;, &quot;USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT&quot;, &quot;douglas  tty8     :0               11:09    2:46m  2:28   0.33s cinnamon-session --session cinnamon&quot;, &quot;douglas  pts/1    :0               12:31   16:00   0.06s  0.00s tmux attach -d&quot;, &quot;douglas  pts/8    :0               11:25    8.00s  5.40s  0.00s /bin/sh -c w&quot;], &quot;warnings&quot;: []}

PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=2    unreachable=0    failed=0   
"><pre class="notranslate"><code class="notranslate">
Task " check existing homedir quota usage" does not fail...

PLAYBOOK: accounts.yml *********************************************************
1 plays in accounts.yml

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
ok: [localhost]

TASK [accounts : include] ******************************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/main.yml:2
skipping: [localhost] =&gt; {"changed": false, "skip_reason": "Conditional check failed", "skipped": true}

TASK [accounts : include] ******************************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/main.yml:5
[DEPRECATION WARNING]: You should not specify tags in the include parameters. All tags should be specified using the task-level option.
This feature will be removed in a future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
included: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml for localhost

TASK [accounts : get fs free space] ********************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:4
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
changed: [localhost] =&gt; {"changed": true, "cmd": "df | grep /boot | awk 'FNR == 2 { print $2 } '", "delta": "0:00:00.003666", "end": "2016-06-15 13:55:11.982607", "invocation": {"module_args": {"_raw_params": "df | grep /boot | awk 'FNR == 2 { print $2 } '", "_uses_shell": true, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 0, "start": "2016-06-15 13:55:11.978941", "stderr": "", "stdout": "523248", "stdout_lines": ["523248"], "warnings": []}

TASK [accounts : print fsusage in kb] ******************************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:13
ok: [localhost] =&gt; {
    "fsusage.stdout_lines": [
        "523248"
    ]
}

TASK [accounts : check existing homedir quota usage] ***************************
task path: /home/douglas/repos/ansible/playbooks/roles/accounts/tasks/nfs.yml:16
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{fsusage.stdout}}').
This feature will be removed in a future release. Deprecation warnings 
can be disabled by setting deprecation_warnings=False in ansible.cfg.
&lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: douglas
&lt;127.0.0.1&gt; EXEC /bin/sh -c 'LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python &amp;&amp; sleep 0'
changed: [localhost] =&gt; (item=523248) =&gt; {"changed": true, "cmd": "w", "delta": "0:00:00.012080", "end": "2016-06-15 13:55:12.160439", "failed": false, "failed_when_result": false, "invocation": {"module_args": {"_raw_params": "w", "_uses_shell": true, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "item": "523248", "rc": 0, "start": "2016-06-15 13:55:12.148359", "stderr": "", "stdout": " 13:55:12 up  2:46,  3 users,  load average: 0.35, 0.26, 0.24\nUSER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT\ndouglas  tty8     :0               11:09    2:46m  2:28   0.33s cinnamon-session --session cinnamon\ndouglas  pts/1    :0               12:31   16:00   0.06s  0.00s tmux attach -d\ndouglas  pts/8    :0               11:25    8.00s  5.40s  0.00s /bin/sh -c w", "stdout_lines": [" 13:55:12 up  2:46,  3 users,  load average: 0.35, 0.26, 0.24", "USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT", "douglas  tty8     :0               11:09    2:46m  2:28   0.33s cinnamon-session --session cinnamon", "douglas  pts/1    :0               12:31   16:00   0.06s  0.00s tmux attach -d", "douglas  pts/8    :0               11:25    8.00s  5.40s  0.00s /bin/sh -c w"], "warnings": []}

PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=2    unreachable=0    failed=0   

</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>