Add full-blown unreachability checking
This commit is contained in:
parent
22eadcb6e2
commit
815e1bcda1
@ -48,23 +48,28 @@ Lint:
|
|||||||
- ansible-lint site.yml
|
- ansible-lint site.yml
|
||||||
|
|
||||||
Test:
|
Test:
|
||||||
allow_failure: yes
|
|
||||||
interruptible: yes
|
interruptible: yes
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- ansible-playbook --skip-tags no-test -C site.yml --vault-password-file /vaultpw || error="$?"
|
- ansible-playbook --skip-tags no-test -C site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
|
- [ "$error" -eq 4 ] && echo "Some hosts were unreachable; masking error" && unset error
|
||||||
- [ -n "$error" ] && echo "Return code $error" && false
|
- [ -n "$error" ] && echo "Return code $error" && false
|
||||||
|
|
||||||
Play_Against_Pis:
|
Play_Against_Pis:
|
||||||
stage: play
|
stage: play
|
||||||
script:
|
script:
|
||||||
- ansible-playbook -l pis site.yml --vault-password-file /vaultpw
|
- ansible-playbook -l pis site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
|
- [ "$error" -eq 4 ] && echo "Some hosts were unreachable; masking error" && unset error
|
||||||
|
- [ -n "$error" ] && echo "Return code $error" && false
|
||||||
Play_Against_Desktops:
|
Play_Against_Desktops:
|
||||||
stage: play
|
stage: play
|
||||||
script:
|
script:
|
||||||
- ansible-playbook -l desktop site.yml --vault-password-file /vaultpw || error="$?"
|
- ansible-playbook -l desktop site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
|
- [ "$error" -eq 4 ] && echo "Some hosts were unreachable; masking error" && unset error
|
||||||
- [ -n "$error" ] && echo "Return code $error" && false
|
- [ -n "$error" ] && echo "Return code $error" && false
|
||||||
Play_Against_Production:
|
Play_Against_Production:
|
||||||
stage: play
|
stage: play
|
||||||
script:
|
script:
|
||||||
- ansible-playbook -l prod site.yml --vault-password-file /vaultpw
|
- ansible-playbook -l prod site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
|
- [ "$error" -eq 4 ] && echo "Some hosts were unreachable; masking error" && unset error
|
||||||
|
- [ -n "$error" ] && echo "Return code $error" && false
|
||||||
|
Loading…
Reference in New Issue
Block a user