Added storage nodes for k3s
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: See if k3s file exists
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: /usr/local/bin/k3s
|
||||
register: k3s_status
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
- name: Install K3s server with node taint and TLS SAN
|
||||
when: (host.ip == k3s.server.ips[0] and (not k3s_status.stat.exists))
|
||||
command: |
|
||||
ansible.builtin.command: |
|
||||
/tmp/k3s_install.sh server \
|
||||
--node-taint CriticalAddonsOnly=true:NoExecute \
|
||||
--tls-san {{ k3s.loadbalancer.ip }}
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
- name: Set fact on k3s.server.ips[0]
|
||||
when: host.ip == k3s.server.ips[0]
|
||||
set_fact: k3s_token="{{ k3s_token['content'] | b64decode | trim }}"
|
||||
ansible.builtin.set_fact: k3s_token="{{ k3s_token['content'] | b64decode | trim }}"
|
||||
|
||||
- name: Install K3s on the secondary servers
|
||||
when: (host.ip != k3s.server.ips[0] and (not k3s_status.stat.exists))
|
||||
command: |
|
||||
ansible.builtin.command: |
|
||||
/tmp/k3s_install.sh server \
|
||||
--node-taint CriticalAddonsOnly=true:NoExecute \
|
||||
--tls-san {{ k3s.loadbalancer.ip }}
|
||||
|
||||
Reference in New Issue
Block a user