Browse Source

Merge pull request #1613 from sdodson/bz1317734

Only mask etcd service for containerized installls when it's installed
Brenton Leanhardt 9 years ago
parent
commit
5dc777b37d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      roles/etcd/tasks/main.yml

+ 5 - 1
roles/etcd/tasks/main.yml

@@ -36,8 +36,12 @@
     state: stopped
     enabled: no
 
+- name: Check for etcd service presence
+  command: systemctl show etcd.service
+  register: etcd_show
+  
 - name: Mask system etcd when containerized
-  when: openshift.common.is_containerized | bool
+  when: openshift.common.is_containerized | bool and 'LoadState=not-found' not in etcd_show.stdout
   command: systemctl mask etcd
 
 - name: Reload systemd units