HA fixes and code tweaks

- Reboot playbook updated for HA testing
- Small adjustment made after testing HA with playbook
- Fix reset playbook failing in some cases

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Nicholas Malcolm
2023-02-01 10:22:54 -05:00
committed by Derek Nola
parent cd725780f5
commit 7cc70ad609
5 changed files with 38 additions and 29 deletions

View File

@@ -1,4 +1,10 @@
---
- name: Clean previous failed runs of k3s-init
# systemd builtin does not support reset-failed
ansible.builtin.command: systemctl reset-failed k3s-init
failed_when: false
changed_when: false
- name: Disable services
ansible.builtin.systemd:
name: "{{ item }}"
@@ -6,12 +12,13 @@
enabled: false
failed_when: false
with_items:
- k3s-init
- k3s-server
- k3s-agent
- name: Kill container shim
register: pkill_containerd_shim_runc
ansible.builtin.command: pkill -9 -f "k3s/data/[^/]+/bin/containerd-shim-runc"
register: pkill_containerd_shim_runc
changed_when: "pkill_containerd_shim_runc.rc == 0"
failed_when: false
@@ -25,7 +32,7 @@
loop_control:
loop_var: mounted_fs
- name: Remove service files, binaries and data
- name: Remove service files, binaries, and data
ansible.builtin.file:
name: "{{ item }}"
state: absent