From 0a2b60f16ffc85877e5b6c149930e0fa007fd7fa Mon Sep 17 00:00:00 2001 From: Joel Diaz Date: Thu, 25 Jan 2018 16:15:22 +0000 Subject: ignore 'users' field in oc_group module oc_group doesn't manage the list of users assigned to a group (oc_user does). so when doing an oc_group: state: present name: groupA on a pre-existing group 'groupA' with already defined users, oc_group would detect a difference an blow away the existing users fix this by adding 'users' to the list of fields to ignore when determining whether there are object differences --- roles/lib_openshift/library/oc_group.py | 2 +- roles/lib_openshift/src/class/oc_group.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/lib_openshift/library/oc_group.py b/roles/lib_openshift/library/oc_group.py index 1b63a6c13..72023eaf7 100644 --- a/roles/lib_openshift/library/oc_group.py +++ b/roles/lib_openshift/library/oc_group.py @@ -1485,7 +1485,7 @@ class OCGroup(OpenShiftCLI): def needs_update(self): ''' verify an update is needed ''' - return not Utils.check_def_equal(self.config.data, self.group.yaml_dict, skip_keys=[], debug=True) + return not Utils.check_def_equal(self.config.data, self.group.yaml_dict, skip_keys=['users'], debug=True) # pylint: disable=too-many-return-statements,too-many-branches @staticmethod diff --git a/roles/lib_openshift/src/class/oc_group.py b/roles/lib_openshift/src/class/oc_group.py index 89fb09ea4..53e6b6766 100644 --- a/roles/lib_openshift/src/class/oc_group.py +++ b/roles/lib_openshift/src/class/oc_group.py @@ -59,7 +59,7 @@ class OCGroup(OpenShiftCLI): def needs_update(self): ''' verify an update is needed ''' - return not Utils.check_def_equal(self.config.data, self.group.yaml_dict, skip_keys=[], debug=True) + return not Utils.check_def_equal(self.config.data, self.group.yaml_dict, skip_keys=['users'], debug=True) # pylint: disable=too-many-return-statements,too-many-branches @staticmethod -- cgit v1.2.3