Revert Pull Request #5084 (#5120)

Kubespray Pull Request #5084 (https://github.com/kubernetes-sigs/kubespray/pull/5084) caused more problems than it solved due to limitations with the synchronize module. See comments on Kubespray Issues #5059 (https://github.com/kubernetes-sigs/kubespray/issues/5059) and #5116 (https://github.com/kubernetes-sigs/kubespray/issues/5116). Details from Ansible documentation: "Currently, synchronize is limited to elevating permissions via passwordless sudo. This is because rsync itself is connecting to the remote machine and rsync doesn’t give us a way to pass sudo credentials in. ... Currently there are only a few connection types which support synchronize (ssh, paramiko, local, and docker) because a sync strategy has been determined for those connection types. Note that the connection for these must not need a password as rsync itself is making the connection and rsync does not provide us a way to pass a password to the connection. ..." Thus, reverting Pull Request #5084.
This commit is contained in:
Michael Oglesby 2019-10-17 08:26:37 -04:00 committed by Kubernetes Prow Robot
parent d332a254ee
commit c672681ce5

View file

@ -74,9 +74,11 @@
when: kubeconfig_localhost|default(false) when: kubeconfig_localhost|default(false)
- name: Copy kubectl binary to ansible host - name: Copy kubectl binary to ansible host
synchronize: fetch:
src: "{{ bin_dir }}/kubectl" src: "{{ bin_dir }}/kubectl"
dest: "{{ artifacts_dir }}/kubectl" dest: "{{ artifacts_dir }}/kubectl"
flat: yes
validate_checksum: no
become: no become: no
run_once: yes run_once: yes
when: kubectl_localhost|default(false) when: kubectl_localhost|default(false)