From c01d8bc6f65f2c7a4f2dc831414375f2d874273e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 20 Jun 2017 10:46:38 +0200 Subject: etcd, system_container: do not enable system etcd if etcd is installed and it is not the system container, only unmask the service but do not enable it. Signed-off-by: Giuseppe Scrivano --- roles/etcd/tasks/system_container.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/etcd/tasks') diff --git a/roles/etcd/tasks/system_container.yml b/roles/etcd/tasks/system_container.yml index f1d948d16..547cb448d 100644 --- a/roles/etcd/tasks/system_container.yml +++ b/roles/etcd/tasks/system_container.yml @@ -24,12 +24,12 @@ systemd: name: etcd state: stopped - enabled: yes + enabled: no masked: no daemon_reload: yes register: task_result failed_when: task_result|failed and 'could not' not in task_result.msg|lower - when: "'etcd' in etcd_result.stdout" + when: "'etcd' not in etcd_result.stdout" - name: Disable etcd_container systemd: -- cgit v1.2.3 From ed6c9f46272ef927611a1d2cc02826ea0028d571 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 20 Jun 2017 10:48:00 +0200 Subject: etcd, system_container: do not mask etcd_container Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1462087 Signed-off-by: Giuseppe Scrivano --- roles/etcd/tasks/system_container.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'roles/etcd/tasks') diff --git a/roles/etcd/tasks/system_container.yml b/roles/etcd/tasks/system_container.yml index 547cb448d..a01df66b3 100644 --- a/roles/etcd/tasks/system_container.yml +++ b/roles/etcd/tasks/system_container.yml @@ -36,11 +36,18 @@ name: etcd_container state: stopped enabled: no - masked: yes daemon_reload: yes register: task_result failed_when: task_result|failed and 'could not' not in task_result.msg|lower +- name: Remove etcd_container.service + file: + path: /etc/systemd/system/etcd_container.service + state: absent + +- name: Systemd reload configuration + systemd: name=etcd_container daemon_reload=yes + - name: Check for previous etcd data store stat: path: "{{ etcd_data_dir }}/member/" -- cgit v1.2.3