fix ansible password authentication (#6907)

* copying ssh key no longer required, works with password auth
* use copy module instead of synchronize (which requires sshpass)
* less tasks and always changed tasks
This commit is contained in:
Hans Feldt
2020-12-01 00:12:50 +01:00
committed by GitHub
parent cc5303e1c8
commit 80eb1ad936
6 changed files with 18 additions and 66 deletions

View File

@@ -1,51 +1,26 @@
---
- name: install | Copy kubeadm binary from download dir
synchronize:
copy:
src: "{{ local_release_dir }}/kubeadm-{{ kubeadm_version }}-{{ image_arch }}"
dest: "{{ bin_dir }}/kubeadm"
compress: no
perms: yes
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
tags:
- kubeadm
when:
- not inventory_hostname in groups['kube-master']
- name: install | Set kubeadm binary permissions
file:
path: "{{ bin_dir }}/kubeadm"
mode: "0755"
state: file
mode: 0755
remote_src: true
tags:
- kubeadm
when:
- not inventory_hostname in groups['kube-master']
- name: install | Copy kubelet binary from download dir
synchronize:
copy:
src: "{{ local_release_dir }}/kubelet-{{ kube_version }}-{{ image_arch }}"
dest: "{{ bin_dir }}/kubelet"
compress: no
perms: yes
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
mode: 0755
remote_src: true
tags:
- kubelet
- upgrade
notify: Node | restart kubelet
- name: install | Set kubelet binary permissions
file:
path: "{{ bin_dir }}/kubelet"
mode: "0755"
state: file
tags:
- kubelet
- upgrade
- name: install | Copy socat wrapper for Container Linux
command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}"
args: