mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Do not use ‘yes/no’ for boolean values (#11472)
Consistent boolean values in ansible playbooks
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
copy:
|
||||
src: "{{ kube_config_dir }}/admin.conf"
|
||||
dest: "{{ ansible_env.HOME | default('/root') }}/.kube/config"
|
||||
remote_src: yes
|
||||
remote_src: true
|
||||
mode: "0600"
|
||||
backup: yes
|
||||
backup: true
|
||||
|
||||
- name: Create kube artifacts dir
|
||||
file:
|
||||
@@ -41,8 +41,8 @@
|
||||
state: directory
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
become: no
|
||||
run_once: yes
|
||||
become: false
|
||||
run_once: true
|
||||
when: kubeconfig_localhost
|
||||
|
||||
- name: Wait for k8s apiserver
|
||||
@@ -54,7 +54,7 @@
|
||||
- name: Get admin kubeconfig from remote host
|
||||
slurp:
|
||||
src: "{{ kube_config_dir }}/admin.conf"
|
||||
run_once: yes
|
||||
run_once: true
|
||||
register: raw_admin_kubeconfig
|
||||
when: kubeconfig_localhost
|
||||
|
||||
@@ -83,21 +83,21 @@
|
||||
mode: "0600"
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
become: no
|
||||
run_once: yes
|
||||
become: false
|
||||
run_once: true
|
||||
when: kubeconfig_localhost
|
||||
|
||||
- name: Copy kubectl binary to ansible host
|
||||
fetch:
|
||||
src: "{{ bin_dir }}/kubectl"
|
||||
dest: "{{ artifacts_dir }}/kubectl"
|
||||
flat: yes
|
||||
validate_checksum: no
|
||||
flat: true
|
||||
validate_checksum: false
|
||||
register: copy_binary_result
|
||||
until: copy_binary_result is not failed
|
||||
retries: 20
|
||||
become: no
|
||||
run_once: yes
|
||||
become: false
|
||||
run_once: true
|
||||
when: kubectl_localhost
|
||||
|
||||
- name: Create helper script kubectl.sh on ansible host
|
||||
@@ -107,8 +107,8 @@
|
||||
${BASH_SOURCE%/*}/kubectl --kubeconfig=${BASH_SOURCE%/*}/admin.conf "$@"
|
||||
dest: "{{ artifacts_dir }}/kubectl.sh"
|
||||
mode: "0755"
|
||||
become: no
|
||||
run_once: yes
|
||||
become: false
|
||||
run_once: true
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
when: kubectl_localhost and kubeconfig_localhost
|
||||
|
||||
Reference in New Issue
Block a user