summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/handlers/test_flush_handlers_rescue_always.yml
blob: 4a1f741834848042165a6457905581bee027232e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- hosts: A,B
  gather_facts: false
  tasks:
    - block:
        - command: echo
          notify: sometimes_fail

        - meta: flush_handlers
      rescue:
        - debug:
            msg: 'rescue ran'
      always:
        - debug:
            msg: 'always ran'

    - debug:
        msg: 'should run for both hosts'

  handlers:
    - name: sometimes_fail
      fail:
      when: inventory_hostname == 'A'