<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Feature Idea</p>
<h5 dir="auto">Component Name:</h5>
<p dir="auto">blocks</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">Ansible 2.0.0_rc-1</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">NA</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 15.10</p>
<h5 dir="auto">Summary of Decision:</h5>
<p dir="auto">We're open to implementing this but want it to go through the proposal process.  Please see: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="118433547" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/13262" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/13262/hovercard?comment_id=335904803&amp;comment_type=issue_comment" href="https://github.com/ansible/ansible/issues/13262#issuecomment-335904803">#13262 (comment)</a> for details.</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">There are a number of use-cases where it would be valuable to be able to loop over a block of tasks, such that a few tasks are done in order, and that specific block of tasks are looped over for some set of values. It seems that the new block functionality could lend itself well to this if you were to enable looping over blocks.</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="- hosts: localhost
  connection: local
  tasks:
  - block:
    - debug: msg=&quot;task 1 loop {{item}}&quot;
    - debug: msg=&quot;task 2 loop {{item}}&quot;
    with_items:
    - &quot;1&quot;
    - &quot;2&quot;"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
  <span class="pl-ent">connection</span>: <span class="pl-s">local</span>
  <span class="pl-ent">tasks</span>:
  - <span class="pl-ent">block</span>:
    - <span class="pl-ent">debug</span>: <span class="pl-s">msg="task 1 loop {{item}}"</span>
    - <span class="pl-ent">debug</span>: <span class="pl-s">msg="task 2 loop {{item}}"</span>
    <span class="pl-ent">with_items</span>:
    - <span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>
    - <span class="pl-s"><span class="pl-pds">"</span>2<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">Expected Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [debug msg=task 1 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;msg&quot;: &quot;task 1 loop 1&quot;
}

TASK [debug msg=task 2 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;msg&quot;: &quot;task 2 loop 1&quot;
}

TASK [debug msg=task 1 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;msg&quot;: &quot;task 1 loop 2&quot;
}

TASK [debug msg=task 2 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;msg&quot;: &quot;task 2 loop 2&quot;
}

PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=0    unreachable=0    failed=0"><pre class="notranslate"><code class="notranslate">PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [debug msg=task 1 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "msg": "task 1 loop 1"
}

TASK [debug msg=task 2 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "msg": "task 2 loop 1"
}

TASK [debug msg=task 1 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "msg": "task 1 loop 2"
}

TASK [debug msg=task 2 loop {{item}}] ******************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "msg": "task 2 loop 2"
}

PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=0    unreachable=0    failed=0
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR! 'with_items' is not a valid attribute for a Block

The error appears to have been in '/root/test.yml': line 5, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
  - block:
    ^ here"><pre class="notranslate"><code class="notranslate">ERROR! 'with_items' is not a valid attribute for a Block

The error appears to have been in '/root/test.yml': line 5, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
  - block:
    ^ here
</code></pre></div>
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report: file module, state link got broken some time ago.</p>
<p dir="auto">I'm not sure what more exactly triggers this. As this seems such intrusive, I'm flabbergasted it didn't got discovered or mentioned earlier.</p>
<h5 dir="auto">Ansible Version:</h5>
<ul dir="auto">
<li>Good in 1.5.5</li>
<li>Bad in 1.6.0 + devel</li>
<li>Broken since <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/2d25577e1104101c67bb5ac41790693780a6d51b/hovercard" href="https://github.com/ansible/ansible/commit/2d25577e1104101c67bb5ac41790693780a6d51b"><tt>2d25577</tt></a> (according to git bisect between 1.5.5 and 1.6.0, cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bcoca/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bcoca">@bcoca</a>)</li>
</ul>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 13.10 but probably N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Making a basic symlink without any extra options got broken in 1.6</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[A] serge@cyberlab:~/tmp$ ls -l
total 4
-rw-rw-r-- 1 serge serge 128 jun  1 20:41 play
-rw-rw-r-- 1 serge serge   0 jun  1 20:30 source
[A] serge@cyberlab:~/tmp$ cat play 

---
- hosts: localhost
  gather_facts: false
  tasks:
  - file:
      src: ./source
      dest: ./destination
      state: link"><pre class="notranslate"><code class="notranslate">[A] serge@cyberlab:~/tmp$ ls -l
total 4
-rw-rw-r-- 1 serge serge 128 jun  1 20:41 play
-rw-rw-r-- 1 serge serge   0 jun  1 20:30 source
[A] serge@cyberlab:~/tmp$ cat play 

---
- hosts: localhost
  gather_facts: false
  tasks:
  - file:
      src: ./source
      dest: ./destination
      state: link
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">with ansible/release1.6.0</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[A] serge@cyberlab:~/tmp$ ansible-playbook -i localhost,  play 

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

TASK: [file ] ***************************************************************** 
changed: [localhost]

PLAY RECAP ******************************************************************** 
localhost                  : ok=1    changed=1    unreachable=0    failed=0 "><pre class="notranslate"><code class="notranslate">[A] serge@cyberlab:~/tmp$ ansible-playbook -i localhost,  play 

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

TASK: [file ] ***************************************************************** 
changed: [localhost]

PLAY RECAP ******************************************************************** 
localhost                  : ok=1    changed=1    unreachable=0    failed=0 
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">with ansible/release1.5.5:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[A] serge@cyberlab:~/tmp$ ansible-playbook -i localhost,  play 

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

TASK: [file ] ***************************************************************** 
failed: [localhost] =&gt; {&quot;failed&quot;: true, &quot;path&quot;: &quot;./destination&quot;, &quot;src&quot;: &quot;./source&quot;, &quot;state&quot;: &quot;absent&quot;}
msg: src file does not exist

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/serge/play.retry

localhost                  : ok=0    changed=0    unreachable=0    failed=1   "><pre class="notranslate"><code class="notranslate">[A] serge@cyberlab:~/tmp$ ansible-playbook -i localhost,  play 

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

TASK: [file ] ***************************************************************** 
failed: [localhost] =&gt; {"failed": true, "path": "./destination", "src": "./source", "state": "absent"}
msg: src file does not exist

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/serge/play.retry

localhost                  : ok=0    changed=0    unreachable=0    failed=1   
</code></pre></div>