summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/openshift_checks/package_version.py
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-04-13 08:23:24 -0500
committerGitHub <noreply@github.com>2017-04-13 08:23:24 -0500
commit54f32cf9d6f1aa269653b62af905e294aa6f64f3 (patch)
tree10a8fbdc48e8f148aaf5f0ecb690f229e81e2f4b /roles/openshift_health_checker/openshift_checks/package_version.py
parent8515131a88fa3105ade6d209a84b5d6e9ef84e6d (diff)
parent534418d0439a832e59891a36be800affafc29745 (diff)
downloadopenshift-54f32cf9d6f1aa269653b62af905e294aa6f64f3.tar.gz
openshift-54f32cf9d6f1aa269653b62af905e294aa6f64f3.tar.bz2
openshift-54f32cf9d6f1aa269653b62af905e294aa6f64f3.tar.xz
openshift-54f32cf9d6f1aa269653b62af905e294aa6f64f3.zip
Merge pull request #3887 from rhcarvalho/pkg-version-only-master-or-node
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/package_version.py')
-rw-r--r--roles/openshift_health_checker/openshift_checks/package_version.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py
index cca2d8b75..682f6bd40 100644
--- a/roles/openshift_health_checker/openshift_checks/package_version.py
+++ b/roles/openshift_health_checker/openshift_checks/package_version.py
@@ -9,6 +9,13 @@ class PackageVersion(NotContainerizedMixin, OpenShiftCheck):
name = "package_version"
tags = ["preflight"]
+ @classmethod
+ def is_active(cls, task_vars):
+ """Skip hosts that do not have package requirements."""
+ group_names = get_var(task_vars, "group_names", default=[])
+ master_or_node = 'masters' in group_names or 'nodes' in group_names
+ return super(PackageVersion, cls).is_active(task_vars) and master_or_node
+
def run(self, tmp, task_vars):
args = {
"requested_openshift_release": get_var(task_vars, "openshift_release", default=''),