diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-03-20 13:17:08 -0400 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2017-03-20 14:00:20 -0400 |
commit | 4b0fa927ae262a09da87c72ced250c1b3e9c91ae (patch) | |
tree | f9f4e41fc0dc3b6a61bedc04a2102de79afea2f2 /roles/openshift_excluder | |
parent | b6aa824eb212ff968cc4b925bb32c05ef2ebd61d (diff) | |
download | openshift-4b0fa927ae262a09da87c72ced250c1b3e9c91ae.tar.gz openshift-4b0fa927ae262a09da87c72ced250c1b3e9c91ae.tar.bz2 openshift-4b0fa927ae262a09da87c72ced250c1b3e9c91ae.tar.xz openshift-4b0fa927ae262a09da87c72ced250c1b3e9c91ae.zip |
Simplify excluder enablement logic a bit more
Diffstat (limited to 'roles/openshift_excluder')
-rw-r--r-- | roles/openshift_excluder/README.md | 2 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/adjust.yml | 4 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/disable.yml | 1 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/enable.yml | 9 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/exclude.yml | 2 |
5 files changed, 5 insertions, 13 deletions
diff --git a/roles/openshift_excluder/README.md b/roles/openshift_excluder/README.md index e76a15952..e048bd107 100644 --- a/roles/openshift_excluder/README.md +++ b/roles/openshift_excluder/README.md @@ -18,8 +18,6 @@ Facts | enable_docker_excluder | enable_excluders | Enable docker excluder. If not set, the docker excluder is ignored. | | enable_openshift_excluder | enable_excluders | Enable openshift excluder. If not set, the openshift excluder is ignored. | | enable_excluders | None | Enable all excluders -| enable_docker_excluder_override | None | indication the docker excluder needs to be enabled | -| disable_openshift_excluder_override | None | indication the openshift excluder needs to be disabled | Role Variables -------------- diff --git a/roles/openshift_excluder/tasks/adjust.yml b/roles/openshift_excluder/tasks/adjust.yml index cbdd7785b..c32cd6070 100644 --- a/roles/openshift_excluder/tasks/adjust.yml +++ b/roles/openshift_excluder/tasks/adjust.yml @@ -9,7 +9,7 @@ vars: # Enable the docker excluder only if it is overrided # BZ #1430612: docker excluders should be enabled even during installation and upgrade - exclude_docker_excluder: "{{ enable_docker_excluder | default(true) | bool }}" + exclude_docker_excluder: "{{ docker_excluder_on | bool }}" # excluder is to be disabled by default exclude_openshift_excluder: false # All excluders that are to be disabled are disabled @@ -20,6 +20,6 @@ unexclude_docker_excluder: false # disable openshift excluder is never overrided to be enabled # disable it if the docker excluder is enabled - unexclude_openshift_excluder: "{{ openshift_excluder_on | bool }}" + unexclude_openshift_excluder: true when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_excluder/tasks/disable.yml b/roles/openshift_excluder/tasks/disable.yml index 2245c7b21..988cda166 100644 --- a/roles/openshift_excluder/tasks/disable.yml +++ b/roles/openshift_excluder/tasks/disable.yml @@ -1,7 +1,6 @@ --- # input variables # - with_status_check -# - with_install # - excluder_package_state # - docker_excluder_package_state - include: init.yml diff --git a/roles/openshift_excluder/tasks/enable.yml b/roles/openshift_excluder/tasks/enable.yml index 9122c9aeb..e719325bc 100644 --- a/roles/openshift_excluder/tasks/enable.yml +++ b/roles/openshift_excluder/tasks/enable.yml @@ -1,6 +1,5 @@ --- # input variables: -# - with_install - block: - include: init.yml @@ -8,14 +7,12 @@ vars: install_docker_excluder: "{{ docker_excluder_on | bool }}" install_openshift_excluder: "{{ openshift_excluder_on | bool }}" - when: with_install | default(docker_excluder_on or openshift_excluder_on) | bool + when: docker_excluder_on or openshift_excluder_on | bool - include: exclude.yml vars: - # Enable the docker excluder only if it is overrided, resp. enabled by default (in that order) - exclude_docker_excluder: "{{ enable_docker_excluder_override | default(docker_excluder_on) | bool }}" - # Enable the openshift excluder only if it is not overrided, resp. enabled by default (in that order) - exclude_openshift_excluder: "{{ not disable_openshift_excluder_override | default(not openshift_excluder_on) | bool }}" + exclude_docker_excluder: "{{ docker_excluder_on | bool }}" + exclude_openshift_excluder: "{{ openshift_excluder_on | bool }}" when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_excluder/tasks/exclude.yml b/roles/openshift_excluder/tasks/exclude.yml index d31351aea..293a54184 100644 --- a/roles/openshift_excluder/tasks/exclude.yml +++ b/roles/openshift_excluder/tasks/exclude.yml @@ -5,8 +5,6 @@ - block: - name: Enable docker excluder command: "{{ openshift.common.service_type }}-docker-excluder exclude" - # if the docker override is set, it means the docker excluder needs to be enabled no matter what - # if the docker override is not set, the excluder is set based on enable_docker_excluder when: - exclude_docker_excluder | default(false) | bool |