From 26120c3e9846c11c45f5c8d2257cf29e63be86a6 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 8 Dec 2023 21:49:59 +0930 Subject: [PATCH 1/2] fix(handler): kubernetes restart when clause corrected issue raised its head due to ansible update to 2.16.1 !15 fixes #16 nofusscomputing/projects/ansible/execution_environment#21 nofusscomputing/infrastructure/configuration-management/project-production!17 --- handlers/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index e6eb601..3a85a20 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -29,7 +29,7 @@ state: restarted listen: kubernetes_restart when: |- - {%- if + not ( nfc_kubernetes_no_restart or ( @@ -49,8 +49,5 @@ and nfc_kubernetes_no_restart_slave ) - -%} - false - {%- else -%} - true - {%- endif %} + ) + From c04b12a714a998dbe50256fb4f7f0c7f54f56536 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 8 Dec 2023 21:50:43 +0930 Subject: [PATCH 2/2] refactor(tasks): ensure module FQCN is used !15 nofusscomputing/infrastructure/configuration-management/project-production!17 --- tasks/k3s/install.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tasks/k3s/install.yaml b/tasks/k3s/install.yaml index 7ea2982..ae59530 100644 --- a/tasks/k3s/install.yaml +++ b/tasks/k3s/install.yaml @@ -12,30 +12,30 @@ - name: Remove swapfile from /etc/fstab - mount: + ansible.posix.mount: name: "{{ item }}" fstype: swap state: absent with_items: - swap - none - when: + when: - ansible_os_family == 'Debian' # ansible_lsb.codename = bullseye, ansible_lsb.major_release = 11 tags: - install - name: Disable swap - command: swapoff -a + ansible.builtin.command: + cmd: swapoff -a changed_when: false - when: - #- ansible_swaptotal_mb > 0 + when: - ansible_os_family == 'Debian' tags: - install - name: Check an armbian os system - stat: + ansible.builtin.stat: path: /etc/default/armbian-zram-config register: armbian_stat_result @@ -48,8 +48,6 @@ args: executable: bash changed_when: false - # failed_when: false - #notify: RebootHost # doesnt need to reboot as swapoff -a covers the deployment when: armbian_stat_result.stat.exists