From 8b29fcfca4a244802b725118869d0370a7c715c4 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 7 Jun 2017 15:55:06 +0200 Subject: etcd: unmask system container service before installing it Signed-off-by: Giuseppe Scrivano --- roles/etcd/tasks/system_container.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'roles/etcd') diff --git a/roles/etcd/tasks/system_container.yml b/roles/etcd/tasks/system_container.yml index 34bff52b1..af972bf47 100644 --- a/roles/etcd/tasks/system_container.yml +++ b/roles/etcd/tasks/system_container.yml @@ -15,6 +15,32 @@ {%- endif -%} {% endfor -%} +- name: Check etcd system container package + command: > + atomic containers list --no-trunc -a -f container=etcd -f backend=ostree + register: etcd_result + +- name: Unmask etcd service + systemd: + name: etcd + state: stopped + enabled: yes + 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" + +- name: Disable etcd_container + systemd: + 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: Check for previous etcd data store stat: path: "{{ etcd_data_dir }}/member/" -- cgit v1.2.3