summaryrefslogtreecommitdiffstats
path: root/roles/etcd
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-05-30 14:29:50 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-05-30 14:29:50 -0300
commit1d4a3de319f3e3f33bd5bd65298c68c04f576085 (patch)
tree5dfaf91e0fbe77a8346b1c47c05580bf13a9fb2d /roles/etcd
parentf24cc239bcd10d51427a751044b73d1c6470b9b2 (diff)
downloadopenshift-1d4a3de319f3e3f33bd5bd65298c68c04f576085.tar.gz
openshift-1d4a3de319f3e3f33bd5bd65298c68c04f576085.tar.bz2
openshift-1d4a3de319f3e3f33bd5bd65298c68c04f576085.tar.xz
openshift-1d4a3de319f3e3f33bd5bd65298c68c04f576085.zip
Fix error with containerized etcd install.
Role was assuming it could successfully disable the rpm etcd service without checking if it was actuall present.
Diffstat (limited to 'roles/etcd')
-rw-r--r--roles/etcd/tasks/main.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index a798dc973..71735dc25 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -28,18 +28,18 @@
state: directory
mode: 0700
+- name: Check for etcd service presence
+ command: systemctl show etcd.service
+ register: etcd_show
+ changed_when: false
+
- name: Disable system etcd when containerized
- when: etcd_is_containerized | bool
+ when: etcd_is_containerized | bool and 'LoadState=not-found' not in etcd_show.stdout
service:
name: etcd
state: stopped
enabled: no
-- name: Check for etcd service presence
- command: systemctl show etcd.service
- register: etcd_show
- changed_when: false
-
- name: Mask system etcd when containerized
when: etcd_is_containerized | bool and 'LoadState=not-found' not in etcd_show.stdout
command: systemctl mask etcd