Skip to content

Instantly share code, notes, and snippets.

@andersbc
Created July 4, 2015 23:42
Show Gist options
  • Save andersbc/33daefe44e31eccd21aa to your computer and use it in GitHub Desktop.
Save andersbc/33daefe44e31eccd21aa to your computer and use it in GitHub Desktop.
Possible bug ansible dev 2 - tasks are executed muliple times when including other plays
---
- include: play_a.yml
- include: play_b.yml
# to run (include trailing comma!):
# $ ansible-playbook masterplay.yml -i 127.0.0.1,
---
- hosts: 127.0.0.1
connection: local
name: play a
vars:
foo2: bar
tasks:
- name: the task in play a
debug: msg="{{ foo2 }}"
---
- hosts: 127.0.0.1
connection: local
name: play b
vars:
foo: bar
tasks:
- name: the task in play b
debug: msg="{{ foo }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment