Issue 1:
AFAICT it's impossible to use a variable for ignore_errors

Given

vars:
ignore_err: no

Solution Attempts

Interpreted as a string, so always true:

ignore_errors: $ignore_err

Dito:

ignore_errors: {{ ignore_err }}

Illegal YAML syntax:

ignore_errors: {{ ignore_err | bool }}

String again...:

ignore_errors: "{{ ignore_err | bool }}"

Maybe I'm stupid, but I can't see how to do this. I had to duplicate the task with one ignore_errors: yes and one no and control it with a when...

Issue 2:
ISSUE TYPE

Documentation Report

COMPONENT NAME

core documentation

ANSIBLE VERSION

ansible 2.1.1.0 (stable-2.1 8659f25) last updated 2016/07/03 12:49:58 (GMT +200)

lib/ansible/modules/core: (stable-2.1 dc15456874) last updated 2016/07/03 12:49:49 (GMT +200)

lib/ansible/modules/extras: (stable-2.1 377f911) last updated 2016/07/03 12:49:49 (GMT +200)

config file =

configured module search path = Default w/o overrides

CONFIGURATION

no changes

OS / ENVIRONMENT

Ansible host: Debian 8.5

managed host: Debian 8.5

SUMMARY

The documentation at http://docs.ansible.com/ansible/playbooks_roles.html#role-dependencies is misleading and incorrect. First, it should be mentioned, that roles are executed multiple times if they have different parameters, regardless of the allow_duplicates setting. Second, in the example, the allow_duplicates is in the wrong meta file because it has to be specified in the role that has to be executed multiple times (in this case brake and tire).

STEPS TO REPRODUCE

# site.yml

---
- name: sample
hosts: server
roles:
- car

# roles/car/meta/main.yml

---
dependencies:
- { role: wheel, n: 1 }
- { role: wheel, n: 2 }
- { role: wheel, n: 3 }
- { role: wheel, n: 4 }

# roles/car/tasks/main.yml

---
- debug:
msg: "in role CAR"

# roles/wheel/meta/main.yml

---
dependencies:
- { role: tire }
- { role: brake }

# roles/wheel/tasks/main.yml

---
- debug:
msg: "in role WHEEL (n={{ n }})"

# roles/tire/meta/main.yml

---
allow_duplicates: no

# roles/tire/tasks/main.yml

---
- debug:
msg: "in role TIRE (n={{ n }})"

# roles/brake/meta/main.yml

---
allow_duplicates: yes

# roles/brake/tasks/main.yml

---
- debug:
msg: "in role BRAKE (n={{ n }})"

EXPECTED RESULTS

With the above configuration, role 'brake' is executed multiple times, while 'tire' is not.

TASK [tire : debug] ************************************************************
ok: [localhost] => {
"msg": "in role TIRE (n=1)"
}

TASK [brake : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role BRAKE (n=1)"
}

TASK [wheel : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role WHEEL (n=1)"
}

TASK [brake : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role BRAKE (n=2)"
}

TASK [wheel : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role WHEEL (n=2)"
}

TASK [brake : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role BRAKE (n=3)"
}

TASK [wheel : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role WHEEL (n=3)"
}

TASK [brake : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role BRAKE (n=4)"
}

TASK [wheel : debug] ***********************************************************
ok: [localhost] => {
"msg": "in role WHEEL (n=4)"
}

TASK [car : debug] *************************************************************
ok: [localhost] => {
"msg": "in role CAR"
}

ACTUAL RESULTS

The actual result matches the expected one, because only the documentation is incorrect.