Fix systemd reload and calico unit

This commit is contained in:
ant31
2016-01-25 02:01:25 +01:00
committed by Antoine Legrand
parent 2cbbcee351
commit 56b92812fa
11 changed files with 39 additions and 31 deletions

View File

@@ -1,14 +1,15 @@
---
- name: restart systemd-etcd
- name: restart etcd
command: /bin/true
notify:
- reload systemd
- restart etcd
- reload etcd
- name: reload systemd
command: systemctl daemon-reload
when: init_system == "systemd"
- name: restart etcd
- name: reload etcd
service:
name: etcd
state: restarted

View File

@@ -7,7 +7,7 @@
when: init_system == "systemd"
notify: restart systemd-etcd
- name: Configure | Write calico-node initd script
- name: Configure | Write etcd initd script
template:
src: deb-etcd.initd.j2
dest: /etc/init.d/etcd
@@ -21,9 +21,3 @@
src: etcd.j2
dest: /etc/etcd.env
notify: restart etcd
- name: Configure | Ensure etcd is running
service:
name: etcd
state: started
enabled: yes

View File

@@ -6,3 +6,13 @@
command: /bin/true
notify: restart etcd
when: etcd_copy.stdout_lines
# reload systemd before starting service
- meta: flush_handlers
- name: Ensure etcd is running
service:
name: etcd
state: started
enabled: yes

View File

@@ -1,6 +1,6 @@
[Unit]
Description=etcd
Conflicts=etcd.service
[Service]
User=etcd