Issue 1:
Sometimes you want to define a complex variable dictionary and do not want to create a separate vault file for passwords. It would be cool for history purpose to use a plain yml file for variable definition and inline vault variable content like the following. This feature is described by @jpmens on http://jpmens.net/2014/02/22/my-thoughts-on-ansible-s-vault/

nameserver: 10.0.0.1
admin: Jane Jolie
dbpassword: @vault@"AHchx0a+G8mejs84tGxCNKxMFP7tM7Y7kl"
webservertype: nginx

Issue 2:
Issue Type:

Bug Report

Ansible Version:

2.0.0 (devel 139138c)

ansible 2.0.0 (devel 139138c604) last updated 2015/07/03 12:38:26 (GMT +200)
lib/ansible/modules/core: (detached HEAD ff69ce7912) last updated 2015/07/03 12:38:49 (GMT +200)
lib/ansible/modules/extras: (detached HEAD 4e48ef9eca) last updated 2015/07/03 12:38:49 (GMT +200)
v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/06/11 22:17:01 (GMT +200)
v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/06/11 22:17:04 (GMT +200)
configured module search path = /opt/ansible/library

Ansible Configuration:

Not sure it has any relevance, but just to be sure: I installed via git to /opt/ansible. I didn't change anything in the config. I can't find ansible.cfg i the above path, though (the issue guide lines asks me to compare that with the most recent version on git)

Environment:

Local: Ubuntu 15.04. The issues reproduces on local connection and on a Ubuntu 14.04 vagrant VM box.

Summary:

As the title states: Tasks are executed duplicate times when including plays from 'master play', i.e. a play that does nothing than include other plays. Task in the first included play gets executed once, tasks in the next included play gets executed twice ... and so forth (the example below is just for two plays).

(I'm not sure if the task actually gets executed more than once or if it's just an issue with the terminal out output)

Steps To Reproduce:

Put the files below in the same folder and run: $ ansible-playbook masterplay.yml -i 127.0.0.1, (inlucde the trailing comma). You can also just grab the files here: https://gist.github.com/andersbc/33daefe44e31eccd21aa.

masterplay.yml:

---
- include: play_a.yml
- include: play_b.yml

play_a.yml:

---
- hosts: 127.0.0.1
connection: local
name: play a
vars:
foo: bar
tasks:
- name: the task in play a
debug: msg="{{ foo }}"

play_b.yml:

---
- hosts: 127.0.0.1
connection: local
name: play b
vars:
foo2: bar
tasks:
- name: the task in play b
debug: msg="{{ foo2 }}"

Expected Results:

Only one execution of the task in the second included play (play b)

Actual Results:

PLAY: play a ********************************************************************

TASK [setup] ********************************************************************
ok: [127.0.0.1]

TASK [the task in play a] *******************************************************
ok: [127.0.0.1] => {
"msg": "bar",
"changed": false
}

PLAY: play b ********************************************************************

PLAY: play b ********************************************************************

TASK [the task in play b] *******************************************************

TASK [the task in play b] *******************************************************
ok: [127.0.0.1] => {
"msg": "bar",
"changed": false
}
ok: [127.0.0.1]

PLAY RECAP **********************************************************************
127.0.0.1 : ok=3 changed=0 unreachable=0 failed=0