浏览代码

Only mask etcd service for containerized installls when it's installed

Scott Dodson 9 年之前
父节点
当前提交
db162014ab
共有 1 个文件被更改,包括 5 次插入1 次删除
  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