mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 11:54:47 +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
|
# 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():
|
|||||||
|
|
||||||
# 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")
|
||||||
|
|||||||
Reference in New Issue
Block a user