summaryrefslogtreecommitdiff
path: root/playbooks.d/k3s-master/playbook.bash
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-04-04 21:07:48 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-04-04 21:07:48 +0200
commit1ea1fe366235b17fde86c068fc15cf5666b639f7 (patch)
tree2df0d23ca92d667a0cea5b70ddf833851b032017 /playbooks.d/k3s-master/playbook.bash
parentfb7cad99b08d76ffb942075b95fb31ee76492383 (diff)
Update k3s-master playbook
Diffstat (limited to 'playbooks.d/k3s-master/playbook.bash')
-rw-r--r--playbooks.d/k3s-master/playbook.bash13
1 files changed, 12 insertions, 1 deletions
diff --git a/playbooks.d/k3s-master/playbook.bash b/playbooks.d/k3s-master/playbook.bash
index cc6cd29..d15724b 100644
--- a/playbooks.d/k3s-master/playbook.bash
+++ b/playbooks.d/k3s-master/playbook.bash
@@ -1,7 +1,18 @@
#!/usr/bin/env bash
playbook_add() {
- # TODO: Install kubectl, helm!
+ info "$BASHTARD_PLAYBOOK" "Installing additional programs"
+ pkg install kubectl helm
+
+ info "$BASHTARD_PLAYBOOK" "Writing config.yaml for k3s"
+ mkdir -pv -- /etc/rancher/k3s
+ cat <<-EOF > /etc/rancher/k3s/config.yaml
+ node-name: "${BASHTARD_PLATFORM[fqdn]}"
+ cluster-cidr: 172.19.0.0/16
+ service-cidr: 172.20.0.0/16
+ cluster-domain: cluster.local
+ EOF
+
info "$BASHTARD_PLAYBOOK" "Installing k3s"
curl -sfL https://get.k3s.io | sh - # I hate this