Use Ansible from Ubuntu repos, unmask error code for pushes

This commit is contained in:
Salt 2021-08-01 12:41:46 -05:00
parent 4a0a210138
commit 1d14702333

View File

@ -7,7 +7,8 @@ before_script:
# Get the packages we need # Get the packages we need
- apt-get update - apt-get update
- apt-get install gnupg openssh-client python3-docker python3-pip python-is-python3 wget -y - apt-get install gnupg openssh-client python3-docker python3-pip python-is-python3 wget -y
- pip install ansible ansible-lint - apt-get install ansible ansible-lint -y
#- pip install ansible ansible-lint
# Dump our key # Dump our key
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- echo "$ANSIBLE_SSH_KEY" | tr -d '\r' | ssh-add - - echo "$ANSIBLE_SSH_KEY" | tr -d '\r' | ssh-add -
@ -24,8 +25,8 @@ before_script:
[ -n "$ZEROTIER_NETWORK_ID" ] && \ [ -n "$ZEROTIER_NETWORK_ID" ] && \
wget -qO - https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg | apt-key add - && \ wget -qO - https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg | apt-key add - && \
echo "deb http://download.zerotier.com/debian/buster buster main" >> /etc/apt/sources.list && \ echo "deb http://download.zerotier.com/debian/buster buster main" >> /etc/apt/sources.list && \
apt update && \ apt-get update && \
apt install zerotier-one -y && \ apt-get install zerotier-one -y && \
service zerotier-one start && \ service zerotier-one start && \
sleep 5 && \ sleep 5 && \
zerotier-cli join "$ZEROTIER_NETWORK_ID" && \ zerotier-cli join "$ZEROTIER_NETWORK_ID" && \
@ -62,6 +63,9 @@ Play_Against_Desktops:
stage: play stage: play
script: script:
- ansible-playbook -l desktop site.yml --vault-password-file /vaultpw - ansible-playbook -l desktop site.yml --vault-password-file /vaultpw
- error="$?"
- echo "Return code: $error"
Play_Against_Production: Play_Against_Production:
stage: play stage: play
script: script: