From: Frank Brehm Date: Thu, 2 Jan 2025 13:57:42 +0000 (+0100) Subject: Fixing lib/ansible/ds389_plugins_info.py X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=5a9c5c441bc4d2f515011c2e2af41afa80626b13;p=pixelpark%2Fpp-admin-tools.git Fixing lib/ansible/ds389_plugins_info.py --- diff --git a/lib/ansible/ds389_plugins_info.py b/lib/ansible/ds389_plugins_info.py index a6d3df5..bcc7d64 100644 --- a/lib/ansible/ds389_plugins_info.py +++ b/lib/ansible/ds389_plugins_info.py @@ -124,7 +124,7 @@ class Ds389PluginsInfo(object): def get_automember(self): """Get configuration, definitions and regular expressions of the automember plugnin.""" proc = run( - [self.cmd, self.instance, 'plugin', 'show'], + [self.cmd, self.instance, 'plugin', 'automember', 'show'], capture_output=True, encoding=self.encoding) if proc.stderr: module.warn(proc.stderr) @@ -171,7 +171,7 @@ class Ds389PluginsInfo(object): def _get_automember_definitions(self): proc = run( - [self.cmd, self.instance, 'plugin', 'list', 'definitions'], + [self.cmd, self.instance, 'plugin', 'automember', 'list', 'definitions'], capture_output=True, encoding=self.encoding) if proc.stderr: module.warn(proc.stderr) @@ -179,12 +179,17 @@ class Ds389PluginsInfo(object): return key = 'automember' + re_no_automember = re.compile( + r'^No\s+Automember\s+definitions\s+were\s+found', re.IGNORECASE) for def_name in proc.stdout.splitlines(): def_name = def_name.strip() if not def_name: continue + if re_no_automember.match(def_name): + break + if def_name not in self.result[key]['definition']: self.result[key]['definition'][def_name] = {}