Snel.com Ansible Playbooks
Clone repo on macOS
cd ~/repos
git clone --recurse-submodules git@git.snel.com:snelcom-ansible/snel.ansible.git snel.ansible
Install on macOS
brew install \
ansible \
ansible-lint \
packer \
jq \
siderolabs/talos/talosctl \
kubernetes-cli \
helm \
bitwarden-cli \
velero
helm plugin install https://github.com/databus23/helm-diff
bw config server 'https://pw.snel.com/'
python3 -m pip install --upgrade --requirement ./requirements.txt
ansible-galaxy install --force --role-file ./requirements.yml
git config core.hooksPath .githooks
grep 'OBJC_DISABLE_INITIALIZE_FORK_SAFETY' ~/.zshrc || echo "OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> ~/.zshrc
source ~/.zshrc
Install on Linux (non-root)
mkdir -p "${HOME}/bin"
if [[ "${PATH}" != *"${HOME}/bin"* ]]; then echo 'PATH="${HOME}/bin:${PATH}"' >> ~/.bash_profile; source ~/.bash_profile; fi
curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -o "${HOME}/bin/kubectl"
curl -L "https://github.com/siderolabs/talos/releases/download/latest/talosctl-linux-amd64" -o "${HOME}/bin/talosctl"
curl -L "https://get.helm.sh/helm-$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r '.tag_name' )-linux-amd64.tar.gz" | tar -C "${HOME}/bin" -xpzf - linux-amd64/helm --strip-components 1
chmod +x "${HOME}/bin/"*
Usage
First time: Login on Vaultwarden:
bw login
Execute playbook - VPSses
bw sync
BW_SESSION=$(bw unlock --raw) ansible-playbook site.yml --limit customer_deovero
Execute playbook - (Re)install Talos on Hardware
bw sync
BW_SESSION=$(bw unlock --raw) ansible-playbook ./playbooks/snel.kubernetes-cluster/dci_reinstall_talos.yml --limit customer_deovero