Created
February 2, 2016 12:05
-
-
Save lancelakey/02769ea7974f17de2634 to your computer and use it in GitHub Desktop.
Ansible always run and test afterwards
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
- name: Run some tests | |
hosts: all | |
tasks: | |
- block: | |
- name: block-1 | |
command: /usr/bin/true | |
register: r1 | |
- name: block-2 | |
command: /usr/bin/true | |
register: r2 | |
- name: block-3 | |
command: /usr/bin/true | |
register: r3 | |
ignore_errors: yes | |
- name: Test previous block | |
fail: msg="Previous block failed" | |
when: r1|failed or r2|failed or r3|failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment