use rsync instead of command

This commit is contained in:
Smaine Kahlouch
2016-01-23 18:26:07 +01:00
parent 87d8d87c6e
commit 4984b57aa2
8 changed files with 47 additions and 20 deletions

View File

@@ -1,8 +1,8 @@
---
- name: Calico | Install calicoctl bin
command: cp -pf "{{ local_release_dir }}/calico/bin/calicoctl" "{{ bin_dir }}/calicoctl"
command: rsync -piu "{{ local_release_dir }}/calico/bin/calicoctl" "{{ bin_dir }}/calicoctl"
register: calico_copy
changed_when: false
notify: restart calico-node
- name: Calico | install calicoctl
file: path={{ bin_dir }}/calicoctl mode=0755 state=file
@@ -71,6 +71,12 @@
- name: Calico | Enable calico-node
service: name=calico-node enabled=yes state=started
- name: Calico | Restart calico if binary changed
service:
name: calico-node
state: restarted
when: calico_copy.stdout_lines
- name: Calico | Disable node mesh
shell: calicoctl bgp node-mesh off
environment: