Browse Source

Merge pull request #9214 from vrutkovs/excluders-atomic

Don't enable excluders on Atomic
Vadim Rutkovsky 6 years ago
parent
commit
c01e5efddc
1 changed files with 26 additions and 24 deletions
  1. 26 24
      roles/openshift_excluder/tasks/exclude.yml

+ 26 - 24
roles/openshift_excluder/tasks/exclude.yml

@@ -1,28 +1,30 @@
 ---
-- name: Check for docker-excluder
-  stat:
-    path: /sbin/{{ r_openshift_excluder_service_type }}-docker-excluder
-    get_checksum: false
-    get_attributes: false
-    get_mime: false
-  register: docker_excluder_stat
+- block:
+  - name: Check for docker-excluder
+    stat:
+      path: /sbin/{{ r_openshift_excluder_service_type }}-docker-excluder
+      get_checksum: false
+      get_attributes: false
+      get_mime: false
+    register: docker_excluder_stat
 
-- name: Enable docker excluder
-  command: "/sbin/{{ r_openshift_excluder_service_type }}-docker-excluder exclude"
-  when:
-  - r_openshift_excluder_enable_docker_excluder | bool
-  - docker_excluder_stat.stat.exists
+  - name: Check for openshift excluder
+    stat:
+      path: /sbin/{{ r_openshift_excluder_service_type }}-excluder
+      get_checksum: false
+      get_attributes: false
+      get_mime: false
+    register: openshift_excluder_stat
 
-- name: Check for openshift excluder
-  stat:
-    path: /sbin/{{ r_openshift_excluder_service_type }}-excluder
-    get_checksum: false
-    get_attributes: false
-    get_mime: false
-  register: openshift_excluder_stat
+  - name: Enable docker excluder
+    command: "/sbin/{{ r_openshift_excluder_service_type }}-docker-excluder exclude"
+    when:
+    - r_openshift_excluder_enable_docker_excluder | bool
+    - docker_excluder_stat.stat.exists
 
-- name: Enable openshift excluder
-  command: "/sbin/{{ r_openshift_excluder_service_type }}-excluder exclude"
-  when:
-  - r_openshift_excluder_enable_openshift_excluder | bool
-  - openshift_excluder_stat.stat.exists
+  - name: Enable openshift excluder
+    command: "/sbin/{{ r_openshift_excluder_service_type }}-excluder exclude"
+    when:
+    - r_openshift_excluder_enable_openshift_excluder | bool
+    - openshift_excluder_stat.stat.exists
+  when: not openshift_is_atomic | bool