feat: distribution is a dict and nodes and cluster are top level (#1288)
* feat: distribution is a dict and nodes and cluster are top level Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: housekeeping Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
cba35dc66a
commit
89673cd17b
55 files changed
+330
-302
No files matched your search
@@ -12,9 +12,9 @@
|
||||
seconds: 5
|
||||
tasks:
|
||||
- name: Details
|
||||
{% if distribution in ['k3s'] %}
|
||||
{% if distribution.type in ["k3s"] %}
|
||||
ansible.builtin.command: "k3s kubectl get node {% raw %}{{ inventory_hostname }}{% endraw %} -o json"
|
||||
{% elif distribution in ['k0s'] %}
|
||||
{% elif distribution.type in ["k0s"] %}
|
||||
ansible.builtin.command: "k0s kubectl get node {% raw %}{{ inventory_hostname }}{% endraw %} -o json"
|
||||
{% endif %}
|
||||
register: kubectl_get_node
|
||||
@@ -32,9 +32,9 @@
|
||||
- name: Cordon
|
||||
kubernetes.core.k8s_drain:
|
||||
name: "{% raw %}{{ inventory_hostname }}{% endraw %}"
|
||||
{% if distribution in ['k3s'] %}
|
||||
{% if distribution.type in ["k3s"] %}
|
||||
kubeconfig: /etc/rancher/k3s/k3s.yaml
|
||||
{% elif distribution in ['k0s'] %}
|
||||
{% elif distribution.type in ["k0s"] %}
|
||||
kubeconfig: /var/lib/k0s/pki/admin.conf
|
||||
{% endif %}
|
||||
state: cordon
|
||||
@@ -43,9 +43,9 @@
|
||||
- name: Drain
|
||||
kubernetes.core.k8s_drain:
|
||||
name: "{% raw %}{{ inventory_hostname }}{% endraw %}"
|
||||
{% if distribution in ['k3s'] %}
|
||||
{% if distribution.type in ["k3s"] %}
|
||||
kubeconfig: /etc/rancher/k3s/k3s.yaml
|
||||
{% elif distribution in ['k0s'] %}
|
||||
{% elif distribution.type in ["k0s"] %}
|
||||
kubeconfig: /var/lib/k0s/pki/admin.conf
|
||||
{% endif %}
|
||||
state: drain
|
||||
@@ -78,9 +78,9 @@
|
||||
- name: Uncordon
|
||||
kubernetes.core.k8s_drain:
|
||||
name: "{% raw %}{{ inventory_hostname }}{% endraw %}"
|
||||
{% if distribution in ['k3s'] %}
|
||||
{% if distribution.type in ["k3s"] %}
|
||||
kubeconfig: /etc/rancher/k3s/k3s.yaml
|
||||
{% elif distribution in ['k0s'] %}
|
||||
{% elif distribution.type in ["k0s"] %}
|
||||
kubeconfig: /var/lib/k0s/pki/admin.conf
|
||||
{% endif %}
|
||||
state: uncordon
|
||||
|
||||
Reference in new issue
Block a user