Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/10753-ipa-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- ipa_* modules - support environment fallback for ``validate_certs`` parameter (https://github.com/ansible-collections/community.general/pull/10753).
2 changes: 2 additions & 0 deletions plugins/doc_fragments/ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class ModuleDocFragment(object):
- This only applies if O(ipa_prot) is V(https).
- If set to V(false), the SSL certificates are not validated.
- This should only set to V(false) used on personally controlled sites using self-signed certificates.
- If the value is not specified in the task, the value of environment variable E(IPA_VALIDATE_CERTS) is used instead.
If both the environment variable E(IPA_VALIDATE_CERTS) and the value are not specified in the task, then default value is used.
Comment on lines +65 to +66
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If the value is not specified in the task, the value of environment variable E(IPA_VALIDATE_CERTS) is used instead.
If both the environment variable E(IPA_VALIDATE_CERTS) and the value are not specified in the task, then default value is used.
- If the value is not specified in the task, the value of environment variable E(ANSIBLE_IPA_VALIDATE_CERTS) is used instead.
If both the environment variable E(ANSIBLE_IPA_VALIDATE_CERTS) and the value are not specified in the task, then default value is used.

type: bool
default: true
ipa_timeout:
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,5 @@ def ipa_argument_spec():
ipa_user=dict(type='str', default='admin', fallback=(env_fallback, ['IPA_USER'])),
ipa_pass=dict(type='str', no_log=True, fallback=(env_fallback, ['IPA_PASS'])),
ipa_timeout=dict(type='int', default=10, fallback=(env_fallback, ['IPA_TIMEOUT'])),
validate_certs=dict(type='bool', default=True),
validate_certs=dict(type='bool', default=True, fallback=(env_fallback, ['IPA_VALIDATE_CERTS'])),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validate_certs=dict(type='bool', default=True, fallback=(env_fallback, ['IPA_VALIDATE_CERTS'])),
validate_certs=dict(type='bool', default=True, fallback=(env_fallback, ['ANSIBLE_IPA_VALIDATE_CERTS'])),

)