From 2b435a591d423e4ab891fec0254219ffa0f2859f Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 19:43:12 +0200 Subject: [PATCH] fix sudorule_add_allow_command_group (#2821) (#2833) * fix sudorule_add_allow_command_group fix sudorule_add_allow_command_group is not working on freeIPA 4.8.7 at least, sudorule_add_allow_command should be used instead with item sudocmdgroup * Added changelog fragment (cherry picked from commit ee23c26150d1215ea315d689d9e4e5624fa6c8b9) Co-authored-by: TizeN85 --- changelogs/fragments/2821-ipa_sudorule.yml | 4 ++++ plugins/modules/identity/ipa/ipa_sudorule.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/2821-ipa_sudorule.yml diff --git a/changelogs/fragments/2821-ipa_sudorule.yml b/changelogs/fragments/2821-ipa_sudorule.yml new file mode 100644 index 0000000000..5e1197da95 --- /dev/null +++ b/changelogs/fragments/2821-ipa_sudorule.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - "ipa_sudorule - call ``sudorule_add_allow_command`` method instead of ``sudorule_add_allow_command_group`` + (https://github.com/ansible-collections/community.general/issues/2442)." diff --git a/plugins/modules/identity/ipa/ipa_sudorule.py b/plugins/modules/identity/ipa/ipa_sudorule.py index 15abef8f17..4494122e8d 100644 --- a/plugins/modules/identity/ipa/ipa_sudorule.py +++ b/plugins/modules/identity/ipa/ipa_sudorule.py @@ -237,7 +237,7 @@ class SudoRuleIPAClient(IPAClient): return self._post_json(method='sudorule_add_allow_command', name=name, item={'sudocmd': item}) def sudorule_add_allow_command_group(self, name, item): - return self._post_json(method='sudorule_add_allow_command_group', name=name, item={'sudocmdgroup': item}) + return self._post_json(method='sudorule_add_allow_command', name=name, item={'sudocmdgroup': item}) def sudorule_remove_allow_command(self, name, item): return self._post_json(method='sudorule_remove_allow_command', name=name, item=item)