Browse Source

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

Scott Dodson 9 năm trước cách đây
mục cha
commit
db162014ab
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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