Skip to content
Snippets Groups Projects
Commit 5d6324e2 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

module templates: Add example and note for case insensitive members.

Some modules should be compared in a case insensitive manner, and this
patch adds an example of a call to IPAAnsibleModule.params_get_lowercase
and a note on its usage.
parent 8772379d
Branches
Tags
No related merge requests found
...@@ -163,7 +163,10 @@ def main(): ...@@ -163,7 +163,10 @@ def main():
# present # present
PARAMETER1 = ansible_module.params_get("PARAMETER1") PARAMETER1 = ansible_module.params_get("PARAMETER1")
PARAMETER2 = ansible_module.params_get("PARAMETER2") # Note: some parameters must be compared in a case insensitive way,
# or are transliterated into its lowercase version by IPA API. For
# these parameters, use IPAAnsibleModule.params_get_lowercase.
PARAMETER2 = ansible_module.params_get_lowercase("PARAMETER2")
action = ansible_module.params_get("action") action = ansible_module.params_get("action")
# state # state
......
...@@ -135,7 +135,10 @@ def main(): ...@@ -135,7 +135,10 @@ def main():
# present # present
PARAMETER1 = ansible_module.params_get("PARAMETER1") PARAMETER1 = ansible_module.params_get("PARAMETER1")
PARAMETER2 = ansible_module.params_get("PARAMETER2") # Note: some parameters must be compared in a case insensitive way,
# or are transliterated into its lowercase version by IPA API. For
# these parameters, use IPAAnsibleModule.params_get_lowercase.
PARAMETER2 = ansible_module.params_get_lowercase("PARAMETER2")
# state # state
state = ansible_module.params_get("state") state = ansible_module.params_get("state")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment