Created
March 26, 2019 07:53
-
-
Save rvanbutselaar/f4ccdb76bb44e8cb4776a1943e3ff419 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: "{{ src_server }}" | |
gather_facts: false | |
any_errors_fatal: true | |
- block | |
rescue: | |
- set_fact: | |
failed_play: true | |
delegate_to: "{{ item }}" | |
delegate_facts: yes | |
with_items: | |
- "{{ src_server }}" | |
- "{{ dst_server }}" | |
tags: always | |
- hosts: "{{ dst_server }}" | |
gather_facts: false | |
any_errors_fatal: true | |
tasks: | |
- block: | |
- fail: | |
msg: "Fail when previous play(s) also failed" | |
when: failed_play | |
tags: always | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment