fix: ansible dir should only exist for k3s and k0s (#1191)
* fix: ansible dir should only exist for k3s and k0s Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: rename partial files Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
bae0be1ef0
commit
0c4f0260d5
13 files changed
+18
-8
No files matched your search
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
skip_list:
|
||||
- yaml[commas]
|
||||
- yaml[line-length]
|
||||
@@ -7,3 +8,4 @@ warn_list:
|
||||
- deprecated-command-syntax
|
||||
- experimental
|
||||
- no-changed-when
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
---
|
||||
timezone: "#{ bootstrap_timezone }#"
|
||||
github_username: "#{ bootstrap_github_username }#"
|
||||
@@ -17,3 +18,4 @@ node_cidr: "#{ bootstrap_node_cidr }#"
|
||||
cluster_cidr_v6: "#{ bootstrap_cluster_cidr.split(',')[1] }#"
|
||||
service_cidr_v6: "#{ bootstrap_service_cidr.split(',')[1] }#"
|
||||
#% endif %#
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
---
|
||||
kubernetes:
|
||||
children:
|
||||
@@ -25,3 +26,4 @@ kubernetes:
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
#% endif %#
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' %#
|
||||
---
|
||||
- name: Cluster Nuke
|
||||
hosts: kubernetes
|
||||
@@ -21,7 +22,6 @@
|
||||
ansible.builtin.pause:
|
||||
seconds: 5
|
||||
tasks:
|
||||
#% if bootstrap_distribution == "k3s" %#
|
||||
- name: Stop Kubernetes # noqa: ignore-errors
|
||||
ignore_errors: true
|
||||
block:
|
||||
@@ -31,7 +31,6 @@
|
||||
public: true
|
||||
vars:
|
||||
k3s_state: stopped
|
||||
#% endif %#
|
||||
|
||||
# https://github.com/k3s-io/docs/blob/main/docs/installation/network-options.md
|
||||
- name: Networking
|
||||
@@ -57,7 +56,6 @@
|
||||
path: /etc/cni/net.d
|
||||
state: absent
|
||||
|
||||
#% if bootstrap_distribution == "k3s" %#
|
||||
- name: Check to see if k3s-killall.sh exits
|
||||
ansible.builtin.stat:
|
||||
path: /usr/local/bin/k3s-killall.sh
|
||||
@@ -92,7 +90,6 @@
|
||||
path: "{{ k3s_install_dir }}/{{ item }}"
|
||||
state: absent
|
||||
loop: ["kubectl", "crictl", "ctr"]
|
||||
#% endif %#
|
||||
|
||||
- name: Remove local storage path
|
||||
ansible.builtin.file:
|
||||
@@ -103,3 +100,4 @@
|
||||
ansible.builtin.reboot:
|
||||
msg: Rebooting nodes
|
||||
reboot_timeout: 3600
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
---
|
||||
- name: Prepare System
|
||||
hosts: kubernetes
|
||||
@@ -130,3 +131,4 @@
|
||||
ansible.builtin.reboot:
|
||||
msg: Rebooting nodes
|
||||
reboot_timeout: 3600
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
---
|
||||
- name: Reboot
|
||||
hosts: kubernetes
|
||||
@@ -13,3 +14,4 @@
|
||||
ansible.builtin.reboot:
|
||||
msg: Rebooting nodes
|
||||
reboot_timeout: 3600
|
||||
#% endif %#
|
||||
@@ -1,3 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k3s' or bootstrap_distribution == 'k0s' %#
|
||||
---
|
||||
# https://github.com/kevincoakley/ansible-role-k8s-rolling-update
|
||||
- name: Cluster rollout update
|
||||
@@ -86,3 +87,4 @@
|
||||
#% endif %#
|
||||
state: uncordon
|
||||
delegate_to: "{{ groups['master'][0] }}"
|
||||
#% endif %#
|
||||
@@ -15,6 +15,6 @@ spec:
|
||||
bootstrap: true
|
||||
valuesContent: |-
|
||||
#% filter indent(width=4, first=True) %#
|
||||
#% include 'partials/cilium-values-init.yaml.partial' %#
|
||||
#% include 'partials/cilium-values-init.partial.yaml.j2' %#
|
||||
#% endfilter %#
|
||||
#% endif %#
|
||||
@@ -25,5 +25,5 @@ spec:
|
||||
keepHistory: false
|
||||
values:
|
||||
#% filter indent(width=4, first=True) %#
|
||||
#% include 'partials/cilium-values-full.yaml.partial' %#
|
||||
#% include 'partials/cilium-values-full.partial.yaml.j2' %#
|
||||
#% endfilter %#
|
||||
@@ -121,6 +121,6 @@ spec:
|
||||
namespace: kube-system
|
||||
values: |2
|
||||
#% filter indent(width=18, first=True) %#
|
||||
#% include 'partials/cilium-values-init.yaml.partial' %#
|
||||
#% include 'partials/cilium-values-init.partial.yaml.j2' %#
|
||||
#% endfilter %#
|
||||
#% endif %#
|
||||
File renamed without changes.
Reference in new issue
Block a user