summaryrefslogtreecommitdiff
path: root/playbooks.d/k3s-master
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks.d/k3s-master')
-rw-r--r--playbooks.d/k3s-master/etc/defaults1
-rw-r--r--playbooks.d/k3s-master/playbook.bash17
2 files changed, 17 insertions, 1 deletions
diff --git a/playbooks.d/k3s-master/etc/defaults b/playbooks.d/k3s-master/etc/defaults
index 5a09990..51e58ad 100644
--- a/playbooks.d/k3s-master/etc/defaults
+++ b/playbooks.d/k3s-master/etc/defaults
@@ -1,3 +1,4 @@
+pkg.curl=curl
pkg.helm=helm
pkg.k3s=k3s
pkg.kubectl=kubectl
diff --git a/playbooks.d/k3s-master/playbook.bash b/playbooks.d/k3s-master/playbook.bash
index d15724b..a2a301b 100644
--- a/playbooks.d/k3s-master/playbook.bash
+++ b/playbooks.d/k3s-master/playbook.bash
@@ -1,8 +1,23 @@
#!/usr/bin/env bash
playbook_add() {
+ pkg install curl
+
+ case "${BASHTARD_PLATFORM[key]}" in
+ linux-debian|linux-ubuntu)
+ info "$BASHTARD_PLAYBOOK" "Configure package manager repositories"
+ curl https://baltocdn.com/helm/signing.asc | gpg --dearmor > /usr/share/keyrings/helm.gpg
+ printf "deb [arch=%s signed-by=%s] %s all main\n" \
+ "$(dpkg --print-architecture)" \
+ "/usr/share/keyrings/helm.gpg" \
+ "https://baltocdn.com/helm/stable/debian/" \
+ > "/etc/apt/sources.list.d/$BASHTARD_PLAYBOOK.list"
+ apt update
+ ;;
+ esac
+
info "$BASHTARD_PLAYBOOK" "Installing additional programs"
- pkg install kubectl helm
+ pkg install helm
info "$BASHTARD_PLAYBOOK" "Writing config.yaml for k3s"
mkdir -pv -- /etc/rancher/k3s