Issue 1:
Issue Type:

Feature Idea

Component Name:

blocks

Ansible Version:

Ansible 2.0.0_rc-1

Ansible Configuration:

NA

Environment:

Ubuntu 15.10

Summary of Decision:

We're open to implementing this but want it to go through the proposal process. Please see: #13262 (comment) for details.

Summary:

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.

Steps To Reproduce:

- hosts: localhost
connection: local
tasks:
- block:
- debug: msg="task 1 loop {{item}}"
- debug: msg="task 2 loop {{item}}"
with_items:
- "1"
- "2"

Expected Results:

PLAY ***************************************************************************

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

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

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

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

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

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

Actual Results:

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

Issue 2:
Issue Type:

Bug Report: file module, state link got broken some time ago.

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.

Ansible Version:

Good in 1.5.5

Bad in 1.6.0 + devel

Broken since 2d25577 (according to git bisect between 1.5.5 and 1.6.0, cc: @bcoca)

Environment:

Ubuntu 13.10 but probably N/A

Summary:

Making a basic symlink without any extra options got broken in 1.6

Steps To Reproduce:

[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

Expected Results:

with ansible/release1.6.0

[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

Actual Results:

with ansible/release1.5.5:

[A] serge@cyberlab:~/tmp$ ansible-playbook -i localhost, play

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

TASK: [file ] *****************************************************************
failed: [localhost] => {"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