Skip to content

Instantly share code, notes, and snippets.

@fridim
Last active April 11, 2017 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fridim/bf3cb4ca16cfeb5f6ed0ff270355efa6 to your computer and use it in GitHub Desktop.
Save fridim/bf3cb4ca16cfeb5f6ed0ff270355efa6 to your computer and use it in GitHub Desktop.
working
---
- name: conditionnal on blocks in handlers, false false
hosts: localhost
gather_facts: no
vars:
test1: false
test2: false
handlers:
- block:
- name: first block
debug:
msg: "first block, first task"
listen: "first block"
when:
- test1
- block:
- name: second block
debug:
msg: "second block, first task"
listen: "second block"
when:
- test2
tasks:
- name: dummy task
debug:
msg: "dummy task"
changed_when: true
notify:
- "first block"
- "second block"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment