Go to file
Jeroen Vermeulen 3994967fbf
Finally Ansible run completed
2023-10-16 22:26:37 +02:00
.config Generate and apply Talso configs 2023-08-29 00:33:17 +02:00
.githooks Submodule change 2023-08-28 17:58:15 +02:00
configs Finally Ansible run completed 2023-10-16 22:26:37 +02:00
inventory Fixed a lot during reinstall 2023-10-16 20:22:41 +02:00
playbooks Finally Ansible run completed 2023-10-16 22:26:37 +02:00
test Fixed Mayastor DiskPool, K8S upgrade. 2023-09-25 18:36:03 +02:00
.gitignore Talos using DCI works 2023-09-25 14:52:02 +02:00
.gitmodules Submodule change 2023-08-28 17:58:15 +02:00
.yamllint Generate and apply Talso configs 2023-08-29 00:33:17 +02:00
README.md Fixed a lot during reinstall 2023-10-16 20:22:41 +02:00
ansible.cfg Generate and apply Talso configs 2023-08-29 00:33:17 +02:00
requirements.txt Added README 2023-08-28 16:58:46 +02:00
requirements.yml Added README 2023-08-28 16:58:46 +02:00
site.yml Rancher is working, including Vaultwarden password 2023-09-04 18:13:20 +02:00

README.md

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