mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-23 05:56:02 -03:30
Merge pull request #985 from rutsky/check-mode-for-shell-commands
set "check_mode: on" for read-only "shell" steps that registers result
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
register: need_pip
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
when: (need_bootstrap | failed)
|
||||
tags: facts
|
||||
|
||||
@@ -45,6 +46,7 @@
|
||||
- name: Check configured hostname
|
||||
shell: hostname
|
||||
register: configured_hostname
|
||||
check_mode: no
|
||||
|
||||
- name: Assign inventory name to unconfigured hostnames
|
||||
shell: sh -c "echo \"{{inventory_hostname}}\" > /etc/hostname; hostname \"{{inventory_hostname}}\""
|
||||
|
||||
Reference in New Issue
Block a user