Add integration with my ZT management network

This commit is contained in:
Salt 2021-07-31 20:30:16 -05:00
parent 4463d7f467
commit 3281a7ca71

View File

@ -6,7 +6,7 @@ stages:
before_script:
# Get the packages we need
- apt-get update
- apt-get install openssh-client python3-docker python3-pip python-is-python3 -y
- apt-get install gnupg openssh-client python3-docker python3-pip python-is-python3 wget -y
- pip install ansible ansible-lint
# Dump our key
- eval $(ssh-agent -s)
@ -19,8 +19,21 @@ before_script:
- echo "$ANSIBLE_VAULT_PASSWORD" > /vaultpw
# Fix perms on the playbook root
- chmod -R 0750 .
# Join the Zerotier management network
- [ -n "$ZEROTIER_NETWORK_ID" ] && \
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 && \
apt update && \
apt install zerotier-one && \
service zerotier-one start && \
zerotier-cli join "$ZEROTIER_NETWORK_ID" && \
zerotier-cli info && \
zerotier-cli listnetworks
# Get ready for execution
- ansible-galaxy install -r roles/requirements.yml -p roles
after_script:
- [ -n "$ZEROTIER_NETWORK_ID" ] && \
zerotier-cli leave "$ZEROTIER_NETWORK_ID"
Lint:
allow_failure: yes