summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorSam Doran <github@samdoran.com>2022-05-10 17:40:19 -0400
committerGitHub <noreply@github.com>2022-05-10 16:40:19 -0500
commit4bde2d8a9788a47506004da0878775761ee3761d (patch)
treef3b0f5ac8954ca2abcffe1b040c77d74e5a43a6d /changelogs
parent625a99aa32be39cbd9a8c7c8ad326d57cf03812c (diff)
downloadansible-4bde2d8a9788a47506004da0878775761ee3761d.tar.gz
[stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602)
* [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) When looking up the `no_log` setting for a parameter that is an alias in `AnsibleModule._log_invocation()`, the alias value will always be an empty dictionary since `self.aliases` on the `AnsibleModule` instance is never updated after initialization. Since the `no_log` setting is on the canonical parameter not the alias, an incorrect warning is issued if the parameter matches `PASSWORD_MATCH`. This PR returns the aliases dictionary as an attribute of the `ValidationResult` and updates the `aliases` attribute on the `AnsibleModule` instance. (cherry picked from commit 1b947eaf92) Co-authored-by: Sam Doran <github@samdoran.com> * Rewrite test comprehension for Python 2.6 * No need for list inside the dict constructor
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/fragments/77576-arg_spec-no_log-aliases.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/changelogs/fragments/77576-arg_spec-no_log-aliases.yml b/changelogs/fragments/77576-arg_spec-no_log-aliases.yml
new file mode 100644
index 0000000000..4dfce34cbb
--- /dev/null
+++ b/changelogs/fragments/77576-arg_spec-no_log-aliases.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)