refactor(k3s): replace code with what the provisioner role now offers and store opentofu data accordingly

This commit is contained in:
NaeiKinDus 2024-07-10 00:00:00 +00:00
parent 1b3e0c401c
commit 95bb861049
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56
4 changed files with 22 additions and 83 deletions

View file

@ -1,6 +1,5 @@
---
# TODO: disable swap
- name: setup firewall rules
become: true
ansible.builtin.template:
@ -18,11 +17,11 @@
connection: local
ansible.builtin.command:
argv:
- "{{ k3sup_binary }}"
- "{{ provisioner_facts.k3sup_binary_path }}"
- install
- "--merge"
- "--local-path"
- "{{ kubeconfig_repository }}/{{ k3s_cluster_name }}.kubeconfig"
- "{{ provisioner_facts.kubeconfig_repository }}/{{ k3s_cluster_name }}.kubeconfig"
- "--context"
- "{{ k3s_kube_context }}"
- "--k3s-extra-args"