summaryrefslogtreecommitdiffstats
path: root/roles/etcd/tasks
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-06-07 15:55:06 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-06-08 17:36:02 +0200
commit8b29fcfca4a244802b725118869d0370a7c715c4 (patch)
treee7b1f769baf40e43d5fc85fd3263ee116e1df04c /roles/etcd/tasks
parent098e93cc02adb16f35574127ba86326a8e236a94 (diff)
downloadopenshift-8b29fcfca4a244802b725118869d0370a7c715c4.tar.gz
openshift-8b29fcfca4a244802b725118869d0370a7c715c4.tar.bz2
openshift-8b29fcfca4a244802b725118869d0370a7c715c4.tar.xz
openshift-8b29fcfca4a244802b725118869d0370a7c715c4.zip
etcd: unmask system container service before installing it
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/etcd/tasks')
-rw-r--r--roles/etcd/tasks/system_container.yml26
1 files changed, 26 insertions, 0 deletions
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/"