mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
use rsync instead of command
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
dest: /lib/systemd/system/etcd.service
|
||||
backup: yes
|
||||
when: init_system == "systemd"
|
||||
notify:
|
||||
- restart systemd-etcd
|
||||
notify: restart systemd-etcd
|
||||
|
||||
- name: Configure | Write calico-node initd script
|
||||
template:
|
||||
@@ -24,4 +23,7 @@
|
||||
notify: restart etcd
|
||||
|
||||
- name: Configure | Ensure etcd is running
|
||||
service: name=etcd state=started enabled=yes
|
||||
service:
|
||||
name: etcd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
- name: INSTALL | Copy etcd binaries
|
||||
command: cp -pf "{{ etcd_bin_dir }}/{{ item }}" "{{ bin_dir }}"
|
||||
with_items:
|
||||
- etcdctl
|
||||
- etcd
|
||||
- name: Install | Copy etcd binary
|
||||
command: rsync -piu "{{ etcd_bin_dir }}/etcd" "{{ bin_dir }}/etcd"
|
||||
register: etcd_copy
|
||||
changed_when: false
|
||||
|
||||
- name: Install | Copy etcdctl binary
|
||||
command: rsync -piu "{{ etcd_bin_dir }}/etcdctl" "{{ bin_dir }}/etcdctl"
|
||||
changed_when: false
|
||||
notify: restart etcd
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
- include: install.yml
|
||||
- include: configure.yml
|
||||
|
||||
- name: Restart etcd if binary changed
|
||||
command: /bin/true
|
||||
notify: restart etcd
|
||||
when: etcd_copy.stdout_lines
|
||||
|
||||
Reference in New Issue
Block a user