From 47ac514dc6d08fbe8bbc65eba67b18e04bf1a775 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 28 Aug 2022 16:42:07 -0500 Subject: [PATCH] fix(ansible): fix lint --- roles/k3s/master/tasks/main.yml | 2 ++ roles/k3s/post/tasks/main.yml | 13 +++++++++++++ roles/raspberrypi/tasks/main.yml | 2 ++ 3 files changed, 17 insertions(+) diff --git a/roles/k3s/master/tasks/main.yml b/roles/k3s/master/tasks/main.yml index 8cea4cd..5d6e631 100644 --- a/roles/k3s/master/tasks/main.yml +++ b/roles/k3s/master/tasks/main.yml @@ -9,6 +9,7 @@ - name: Clean previous runs of k3s-init command: systemctl reset-failed k3s-init failed_when: false + changed_when: false args: warn: false # The ansible systemd module does not support reset-failed @@ -58,6 +59,7 @@ until: nodes.rc == 0 and (nodes.stdout.split() | length) == (groups['master'] | length) retries: "{{ retry_count | default(20) }}" delay: 10 + changed_when: false always: - name: Kill the temporary service used for initialization systemd: diff --git a/roles/k3s/post/tasks/main.yml b/roles/k3s/post/tasks/main.yml index ce5b498..6dacf30 100644 --- a/roles/k3s/post/tasks/main.yml +++ b/roles/k3s/post/tasks/main.yml @@ -42,24 +42,28 @@ - name: Apply metallb-system namespace command: >- k3s kubectl apply -f /tmp/k3s/metallb-namespace.yaml + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Test metallb-system namespace command: >- k3s kubectl -n metallb-system + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Apply metallb crds and service command: >- k3s kubectl apply -f /tmp/k3s/metallb.yaml + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Wait for metallb controller to be running command: >- kubectl wait deployment -n metallb-system controller --for condition=Available=True --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true @@ -67,6 +71,7 @@ command: >- kubectl wait -n metallb-system --for=jsonpath='{.status.phase}'=Running pods \ --selector component=controller --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true @@ -79,6 +84,7 @@ command: >- kubectl wait pods -n metallb-system --for condition=Ready \ --selector component=controller,app=metallb --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true @@ -86,6 +92,7 @@ command: >- kubectl wait -n metallb-system --for=jsonpath='{.status.readyReplicas}'=1 replicasets \ --selector component=controller,app=metallb --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true @@ -93,6 +100,7 @@ command: >- kubectl wait -n metallb-system --for=jsonpath='{.status.fullyLabeledReplicas}'=1 replicasets \ --selector component=controller,app=metallb --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true @@ -100,30 +108,35 @@ command: >- kubectl wait -n metallb-system --for=jsonpath='{.status.availableReplicas}'=1 replicasets \ --selector component=controller,app=metallb --timeout=60s + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Test metallb-system webhook-service endpoint command: >- k3s kubectl -n metallb-system get endpoints webhook-service + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Apply metallb CRs command: >- k3s kubectl apply -f /tmp/k3s/metallb-crs.yaml + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Test metallb-system IPAddressPool command: >- k3s kubectl -n metallb-system get IPAddressPool + changed_when: false with_items: "{{ groups['master'] }}" run_once: true - name: Test metallb-system L2Advertisement command: >- k3s kubectl -n metallb-system get L2Advertisement + changed_when: false with_items: "{{ groups['master'] }}" run_once: true diff --git a/roles/raspberrypi/tasks/main.yml b/roles/raspberrypi/tasks/main.yml index 8abebc0..0e17964 100644 --- a/roles/raspberrypi/tasks/main.yml +++ b/roles/raspberrypi/tasks/main.yml @@ -3,11 +3,13 @@ command: grep -E "Raspberry Pi|BCM2708|BCM2709|BCM2835|BCM2836" /proc/cpuinfo register: grep_cpuinfo_raspberrypi failed_when: false + changed_when: false - name: Test for raspberry pi /proc/device-tree/model command: grep -E "Raspberry Pi" /proc/device-tree/model register: grep_device_tree_model_raspberrypi failed_when: false + changed_when: false - name: Set raspberry_pi fact to true set_fact: