Skip to content

Commit

Permalink
missing "check_mode: no"s for several read-only tasks (kubernetes-sig…
Browse files Browse the repository at this point in the history
…s#8584)

this is not complete -- there are almost certainly more instances of
this issue
  • Loading branch information
tjanson authored and LuckySB committed Oct 22, 2023
1 parent 9837395 commit cb02c25
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/etcd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
command: "openssl x509 -in {{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem -noout -serial"
register: "etcd_client_cert_serial_result"
changed_when: false
check_mode: no
when:
- inventory_hostname in groups['k8s_cluster']|union(groups['calico_rr']|default([]))|unique|sort
tags:
Expand Down
1 change: 1 addition & 0 deletions roles/kubernetes/node/tasks/facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
shell: "docker info | grep 'Cgroup Driver' | awk -F': ' '{ print $2; }'"
register: docker_cgroup_driver_result
changed_when: false
check_mode: no

- name: set kubelet_cgroup_driver_detected fact for docker
set_fact:
Expand Down
2 changes: 2 additions & 0 deletions roles/kubernetes/node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
register: modinfo_br_netfilter
failed_when: modinfo_br_netfilter.rc not in [0, 1]
changed_when: false
check_mode: no

- name: Verify br_netfilter module path exists
file:
Expand All @@ -77,6 +78,7 @@
command: "sysctl net.bridge.bridge-nf-call-iptables"
failed_when: false
changed_when: false
check_mode: no
register: sysctl_bridge_nf_call_iptables

- name: Enable bridge-nf-call tables
Expand Down
1 change: 1 addition & 0 deletions roles/kubernetes/node/tasks/pre_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
executable: /bin/bash
failed_when: false
changed_when: false
check_mode: no
register: kubelet_container_check

- name: "Pre-upgrade | copy /var/lib/cni from kubelet"
Expand Down
1 change: 1 addition & 0 deletions roles/network_plugin/calico/tasks/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
command: calicoctl.sh get ipPool {{ calico_pool_name }} -o json
failed_when: False
changed_when: False
check_mode: no
register: calico
run_once: True
delegate_to: "{{ groups['kube_control_plane'][0] }}"
Expand Down

0 comments on commit cb02c25

Please sign in to comment.