Skip to content
Snippets Groups Projects
Commit 84c4c7dc authored by rongzhang's avatar rongzhang
Browse files

Use synchronize module

parent 1d4aa7ab
Branches
Tags
No related merge requests found
---
- name: install | Copy etcd binary from download dir
shell: |
rsync -piu "{{ local_release_dir }}/etcd-{{ etcd_version }}-linux-amd64/etcd" "{{ bin_dir }}/etcd"
rsync -piu "{{ local_release_dir }}/etcd-{{ etcd_version }}-linux-amd64/etcdctl" "{{ bin_dir }}/etcdctl"
- name: install | Copy etcd and etcdctl binary from download dir
synchronize:
src: "{{ local_release_dir }}/etcd-{{ etcd_version }}-linux-amd64/{{ item }}"
dest: "{{ bin_dir }}/{{ item }}"
compress: no
perms: yes
owner: no
group: no
changed_when: false
delegate_to: "{{ inventory_hostname }}"
with_items:
- "etcd"
- "etcdctl"
when: etcd_cluster_setup
- name: install | Set etcd binary permissions
- name: install | Set etcd and etcdctl binary permissions
file:
path: "{{ bin_dir }}/etcd"
mode: "0755"
state: file
when: etcd_cluster_setup
- name: install | Set etcdctl binary permissions
file:
path: "{{ bin_dir }}/etcdctl"
path: "{{ bin_dir }}/{{ item }}"
mode: "0755"
state: file
with_items:
- "etcd"
- "etcdctl"
when: etcd_cluster_setup
......@@ -10,8 +10,15 @@
when: kube_encrypt_secret_data
- name: install | Copy kubectl binary from download dir
command: rsync -piu "{{ local_release_dir }}/hyperkube" "{{ bin_dir }}/kubectl"
synchronize:
src: "{{ local_release_dir }}/hyperkube"
dest: "{{ bin_dir }}/kubectl"
compress: no
perms: yes
owner: no
group: no
changed_when: false
delegate_to: "{{ inventory_hostname }}"
tags:
- hyperkube
- kubectl
......
......@@ -11,6 +11,7 @@
src: "{{ local_release_dir }}/kubeadm"
dest: "{{ bin_dir }}/kubeadm"
compress: no
perms: yes
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
......
......@@ -5,8 +5,10 @@
src: "{{ local_release_dir }}/hyperkube"
dest: "{{ bin_dir }}/kubelet"
compress: no
perms: yes
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
tags:
- hyperkube
- upgrade
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment