Compare commits
2 Commits
48a80c362c
...
8d1f9f4944
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d1f9f4944 | |||
| d4fd43e2f5 |
@@ -28,27 +28,22 @@
|
|||||||
stat:
|
stat:
|
||||||
path: /usr/local/bin/k3s-uninstall.sh
|
path: /usr/local/bin/k3s-uninstall.sh
|
||||||
register: k3s_uninstall_script
|
register: k3s_uninstall_script
|
||||||
when:
|
when: k3s_install_needed
|
||||||
- not (k3s_primary | default(false))
|
|
||||||
- k3s_install_needed
|
|
||||||
|
|
||||||
- name: Reset broken secondary k3s install before rejoin
|
- name: Reset broken k3s install before reinstall
|
||||||
command: /usr/local/bin/k3s-uninstall.sh
|
command: /usr/local/bin/k3s-uninstall.sh
|
||||||
when:
|
when:
|
||||||
- not (k3s_primary | default(false))
|
|
||||||
- k3s_install_needed
|
- k3s_install_needed
|
||||||
- k3s_uninstall_script.stat.exists
|
- k3s_uninstall_script.stat.exists
|
||||||
|
|
||||||
- name: Remove stale k3s data on secondary
|
- name: Remove stale k3s data
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
- /etc/rancher/k3s
|
- /etc/rancher/k3s
|
||||||
- /var/lib/rancher/k3s
|
- /var/lib/rancher/k3s
|
||||||
when:
|
when: k3s_install_needed
|
||||||
- not (k3s_primary | default(false))
|
|
||||||
- k3s_install_needed
|
|
||||||
|
|
||||||
- name: Download k3s install script
|
- name: Download k3s install script
|
||||||
get_url:
|
get_url:
|
||||||
|
|||||||
Reference in New Issue
Block a user