From 534418d0439a832e59891a36be800affafc29745 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 10 Apr 2017 14:03:41 +0200 Subject: Do not check package version on non-master/node --- roles/openshift_health_checker/openshift_checks/package_version.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_health_checker/openshift_checks/package_version.py') diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py index 42193a1c6..e16c2d4c8 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): rpm_prefix = get_var(task_vars, "openshift", "common", "service_type") openshift_release = get_var(task_vars, "openshift_release") -- cgit v1.2.3