mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-08 01:47:37 -02:30
set "check_mode: no" for read-only "shell" steps that registers result
"shell" step doesn't support check mode, which currently leads to failures, when Ansible is being run in check mode (because Ansible doesn't run command, assuming that command might have effect, and no "rc" or "output" is registered). Setting "check_mode: no" allows to run those "shell" commands in check mode (which is safe, because those shell commands doesn't have side effects).
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
register: etcd_member_in_cluster
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
when: is_etcd_master
|
||||
tags: facts
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: etcd_master_cert_data
|
||||
check_mode: no
|
||||
delegate_to: "{{groups['etcd'][0]}}"
|
||||
when: inventory_hostname in groups['etcd'] and sync_certs|default(false) and
|
||||
inventory_hostname != groups['etcd'][0]
|
||||
@@ -97,6 +98,7 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: etcd_node_cert_data
|
||||
check_mode: no
|
||||
delegate_to: "{{groups['etcd'][0]}}"
|
||||
when: (('calico-rr' in groups and inventory_hostname in groups['calico-rr']) or
|
||||
inventory_hostname in groups['k8s-cluster']) and
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
register: etcd_cluster_is_healthy
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
when: is_etcd_master
|
||||
tags: facts
|
||||
|
||||
Reference in New Issue
Block a user