diff --git a/extraconfig/services/kubernetes-master.yaml b/extraconfig/services/kubernetes-master.yaml index 16858cffb8..630d9a2c29 100644 --- a/extraconfig/services/kubernetes-master.yaml +++ b/extraconfig/services/kubernetes-master.yaml @@ -104,6 +104,7 @@ outputs: {{ hostvars.raw_get(host)['ansible_hostname'] }}: ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }} ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }} + ansible_become: true {% endfor %} kube-node: @@ -113,6 +114,7 @@ outputs: {{ hostvars.raw_get(host)['ansible_hostname'] }}: ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }} ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }} + ansible_become: true {% endfor %} etcd: @@ -145,8 +147,8 @@ outputs: {%- if kubespray_command is defined -%} {{kubespray_command}} {%- else -%} + ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook - -b -i '{{playbook_dir}}/kubespray/inventory.yml' --skip-tags docker,bastion-ssh-config --extra-vars '@{{playbook_dir}}/kubespray/global_vars.yml'