Blame SOURCES/ansible-freeipa-1.8.3-ipaconfig-Fix-fail_json-calls_rhbz#2135753.patch

fc3955
From 4da89de1d41a752e561d17f628dd6c2cbda3f326 Mon Sep 17 00:00:00 2001
fc3955
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
fc3955
Date: Wed, 21 Sep 2022 10:10:52 -0300
fc3955
Subject: [PATCH] ipaconfig: Fix fail_json calls.
fc3955
fc3955
Ansible's fail_json() method required that the message paramater was
fc3955
passed with a keyword parameter, rather than a positional one. Although
fc3955
this seems to work with ansible-core 2.13+, it might not work with
fc3955
previous versions of Ansible.
fc3955
fc3955
This patch fixes the behaviour for all supported Ansible versions.
fc3955
---
fc3955
 plugins/modules/ipaconfig.py | 7 ++++---
fc3955
 1 file changed, 4 insertions(+), 3 deletions(-)
fc3955
fc3955
diff --git a/plugins/modules/ipaconfig.py b/plugins/modules/ipaconfig.py
fc3955
index b0b4062..87810b2 100644
fc3955
--- a/plugins/modules/ipaconfig.py
fc3955
+++ b/plugins/modules/ipaconfig.py
fc3955
@@ -533,13 +533,14 @@ def main():
fc3955
             required_sid = any([netbios_name, add_sids])
fc3955
             if required_sid and not enable_sid:
fc3955
                 ansible_module.fail_json(
fc3955
-                    "'enable-sid: yes' required for 'netbios_name' "
fc3955
-                    "and 'add-sids'."
fc3955
+                    msg="'enable-sid: yes' required for 'netbios_name' "
fc3955
+                        "and 'add-sids'."
fc3955
                 )
fc3955
             if enable_sid:
fc3955
                 if not has_enable_sid:
fc3955
                     ansible_module.fail_json(
fc3955
-                        "This version of IPA does not support 'enable-sid'.")
fc3955
+                        msg="This version of IPA does not support enable-sid."
fc3955
+                    )
fc3955
                 if (
fc3955
                     netbios_name
fc3955
                     and netbios_name == get_netbios_name(ansible_module)
fc3955
-- 
fc3955
2.37.3
fc3955