From 0210899eb7187e5d70b490455647cb2bb595169a Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Mon, 9 Dec 2019 14:51:40 -0300 Subject: [PATCH] Allow execution of API commands that do not require a name. There are some commands in the IPA API that do not require arguments, and current implementation does not allow these commands to be execute. This patch adds api_command_no_name to allow the execution of such commands, which is required, for example, to create a vaultcontainer management module. --- plugins/module_utils/ansible_freeipa_module.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/module_utils/ansible_freeipa_module.py b/plugins/module_utils/ansible_freeipa_module.py index a8312bc5..8154a12c 100644 --- a/plugins/module_utils/ansible_freeipa_module.py +++ b/plugins/module_utils/ansible_freeipa_module.py @@ -151,6 +151,13 @@ def api_command(module, command, name, args): return api.Command[command](name, **args) +def api_command_no_name(module, command, args): + """ + Call ipa.Command without a name. + """ + return api.Command[command](**args) + + def api_check_param(command, name): """ Return if param exists in command param list -- GitLab