Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.