summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-04-28 15:41:00 +0200
committerJan Chaloupka <jchaloup@redhat.com>2017-04-28 15:41:00 +0200
commit1b0556f73f6cac0ee799f5746248d3c51fd8ce9f (patch)
tree77a3a0d4c417c72a049cb9955b3ac9b7f1365a4a
parent2b420c18beae43d2f92f5a95bd177d427e81737d (diff)
downloadopenshift-1b0556f73f6cac0ee799f5746248d3c51fd8ce9f.tar.gz
openshift-1b0556f73f6cac0ee799f5746248d3c51fd8ce9f.tar.bz2
openshift-1b0556f73f6cac0ee799f5746248d3c51fd8ce9f.tar.xz
openshift-1b0556f73f6cac0ee799f5746248d3c51fd8ce9f.zip
move excluder upgrade validation tasks under openshift_excluder role
-rw-r--r--playbooks/common/openshift-cluster/upgrades/disable_excluder.yml13
-rw-r--r--roles/openshift_excluder/tasks/verify_excluder.yml (renamed from playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml)2
-rw-r--r--roles/openshift_excluder/tasks/verify_upgrade.yml15
3 files changed, 20 insertions, 10 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/disable_excluder.yml b/playbooks/common/openshift-cluster/upgrades/disable_excluder.yml
index a30952929..02042c1ef 100644
--- a/playbooks/common/openshift-cluster/upgrades/disable_excluder.yml
+++ b/playbooks/common/openshift-cluster/upgrades/disable_excluder.yml
@@ -3,15 +3,10 @@
hosts: oo_masters_to_config:oo_nodes_to_config
gather_facts: no
tasks:
- - include: pre/validate_excluder.yml
- vars:
- excluder: "{{ openshift.common.service_type }}-docker-excluder"
- when: enable_docker_excluder | default(enable_excluders) | default(True) | bool
- - include: pre/validate_excluder.yml
- vars:
- excluder: "{{ openshift.common.service_type }}-excluder"
- when: enable_openshift_excluder | default(enable_excluders) | default(True) | bool
-
+ # verify the excluders can be upgraded
+ - include_role:
+ name: openshift_excluder
+ tasks_from: verify_upgrade
# disable excluders based on their status
- include_role:
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml b/roles/openshift_excluder/tasks/verify_excluder.yml
index 6de1ed061..24a05d56e 100644
--- a/playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml
+++ b/roles/openshift_excluder/tasks/verify_excluder.yml
@@ -11,7 +11,7 @@
failed_when: false
changed_when: false
- - name: Docker excluder version detected
+ - name: "{{ excluder }} version detected"
debug:
msg: "{{ excluder }}: {{ excluder_version.stdout }}"
diff --git a/roles/openshift_excluder/tasks/verify_upgrade.yml b/roles/openshift_excluder/tasks/verify_upgrade.yml
new file mode 100644
index 000000000..6ea2130ac
--- /dev/null
+++ b/roles/openshift_excluder/tasks/verify_upgrade.yml
@@ -0,0 +1,15 @@
+---
+# input variables
+# - repoquery_cmd
+# - openshift_upgrade_target
+- include: init.yml
+
+- include: verify_excluder.yml
+ vars:
+ excluder: "{{ openshift.common.service_type }}-docker-excluder"
+ when: docker_excluder_on
+
+- include: verify_excluder.yml
+ vars:
+ excluder: "{{ openshift.common.service_type }}-excluder"
+ when: openshift_excluder_on