mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 13:53:23 +00:00
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.
This commit is contained in:
@@ -163,7 +163,10 @@ def main():
|
||||
|
||||
# present
|
||||
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")
|
||||
|
||||
# state
|
||||
|
||||
@@ -135,7 +135,10 @@ def main():
|
||||
|
||||
# present
|
||||
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 = ansible_module.params_get("state")
|
||||
|
||||
Reference in New Issue
Block a user