forked from openshift/openshift-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#4176 from mtnbikenc/refactor-openshift_e…
…xcluders Merged by openshift-bot
- Loading branch information
Showing
19 changed files
with
254 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
--- | ||
# keep the 'current' package or update to 'latest' if available? | ||
openshift_excluder_package_state: present | ||
docker_excluder_package_state: present | ||
r_openshift_excluder_package_state: present | ||
r_openshift_excluder_docker_package_state: present | ||
|
||
enable_excluders: true | ||
# Legacy variables are included for backwards compatibility with v3.5 | ||
# Inventory variables Legacy | ||
# openshift_enable_excluders enable_excluders | ||
# openshift_enable_openshift_excluder enable_openshift_excluder | ||
# openshift_enable_docker_excluder enable_docker_excluder | ||
r_openshift_excluder_enable_excluders: "{{ openshift_enable_excluders | default(enable_excluders) | default(true) }}" | ||
r_openshift_excluder_enable_openshift_excluder: "{{ openshift_enable_openshift_excluder | default(enable_openshift_excluder) | default(r_openshift_excluder_enable_excluders) }}" | ||
r_openshift_excluder_enable_docker_excluder: "{{ openshift_enable_docker_excluder | default(enable_docker_excluder) | default(r_openshift_excluder_enable_excluders) }}" | ||
|
||
# Default action when calling this role | ||
r_openshift_excluder_action: enable | ||
|
||
# When upgrading, this variable should be set to true when calling the role | ||
r_openshift_excluder_verify_upgrade: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,38 @@ | ||
--- | ||
# input variables | ||
# - excluder_package_state | ||
# - docker_excluder_package_state | ||
- include: init.yml | ||
- when: r_openshift_excluder_verify_upgrade | ||
block: | ||
- name: Include verify_upgrade.yml when upgrading | ||
include: verify_upgrade.yml | ||
|
||
# unexclude the current openshift/origin-excluder if it is installed so it can be updated | ||
- include: unexclude.yml | ||
- name: Disable OpenShift excluder so it can be updated | ||
include: unexclude.yml | ||
vars: | ||
unexclude_docker_excluder: false | ||
unexclude_openshift_excluder: "{{ openshift_excluder_on | bool }}" | ||
when: | ||
- not openshift.common.is_atomic | bool | ||
unexclude_openshift_excluder: "{{ r_openshift_excluder_enable_openshift_excluder }}" | ||
|
||
# Install any excluder that is enabled | ||
- include: install.yml | ||
vars: | ||
# Both docker_excluder_on and openshift_excluder_on are set in openshift_excluder->init task | ||
install_docker_excluder: "{{ docker_excluder_on | bool }}" | ||
install_openshift_excluder: "{{ openshift_excluder_on | bool }}" | ||
when: docker_excluder_on or openshift_excluder_on | ||
|
||
# if the docker excluder is not enabled, we don't care about its status | ||
# it the docker excluder is enabled, we install it and in case its status is non-zero | ||
# it is enabled no matter what | ||
- name: Include install.yml | ||
include: install.yml | ||
|
||
# And finally adjust an excluder in order to update host components correctly. First | ||
# exclude then unexclude | ||
- block: | ||
- include: exclude.yml | ||
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: "{{ docker_excluder_on | bool }}" | ||
# excluder is to be disabled by default | ||
exclude_openshift_excluder: false | ||
# All excluders that are to be disabled are disabled | ||
- include: unexclude.yml | ||
vars: | ||
# If the docker override is not set, default to the generic behaviour | ||
# BZ #1430612: docker excluders should be enabled even during installation and upgrade | ||
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 }}" | ||
when: | ||
- not openshift.common.is_atomic | bool | ||
- name: Include exclude.yml | ||
include: exclude.yml | ||
vars: | ||
# Enable the docker excluder only if it is overridden | ||
# BZ #1430612: docker excluders should be enabled even during installation and upgrade | ||
exclude_docker_excluder: "{{ r_openshift_excluder_enable_docker_excluder }}" | ||
# excluder is to be disabled by default | ||
exclude_openshift_excluder: false | ||
|
||
# All excluders that are to be disabled are disabled | ||
- name: Include unexclude.yml | ||
include: unexclude.yml | ||
vars: | ||
# If the docker override is not set, default to the generic behaviour | ||
# BZ #1430612: docker excluders should be enabled even during installation and upgrade | ||
unexclude_docker_excluder: false | ||
# disable openshift excluder is never overridden to be enabled | ||
# disable it if the docker excluder is enabled | ||
unexclude_openshift_excluder: "{{ r_openshift_excluder_enable_openshift_excluder }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
--- | ||
# input variables: | ||
- block: | ||
- include: init.yml | ||
- name: Install excluders | ||
include: install.yml | ||
|
||
- include: install.yml | ||
vars: | ||
install_docker_excluder: "{{ docker_excluder_on | bool }}" | ||
install_openshift_excluder: "{{ openshift_excluder_on | bool }}" | ||
when: docker_excluder_on or openshift_excluder_on | bool | ||
|
||
- include: exclude.yml | ||
vars: | ||
exclude_docker_excluder: "{{ docker_excluder_on | bool }}" | ||
exclude_openshift_excluder: "{{ openshift_excluder_on | bool }}" | ||
|
||
when: | ||
- not openshift.common.is_atomic | bool | ||
- name: Enable excluders | ||
include: exclude.yml |
Oops, something went wrong.