From 5a9c5c441bc4d2f515011c2e2af41afa80626b13 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 2 Jan 2025 14:57:42 +0100 Subject: [PATCH] Fixing lib/ansible/ds389_plugins_info.py --- lib/ansible/ds389_plugins_info.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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] = {} -- 2.39.5