Correct yaml errors in gitlab CI

This commit is contained in:
Salt 2021-08-01 13:38:23 -05:00
parent 815e1bcda1
commit 708a27926b

View File

@ -52,24 +52,24 @@ Test:
stage: test
script:
- 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
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
Play_Against_Pis:
stage: play
script:
- 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
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
Play_Against_Desktops:
stage: play
script:
- 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
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
Play_Against_Production:
stage: play
script:
- 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
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
- if [ -n "$error" ]; then echo "Return code $error"; false; fi