From 40394ed671ffdcc42cd9e5bdb736a682d7452319 Mon Sep 17 00:00:00 2001
From: kaorihinata <kaori.hinata@gmail.com>
Date: Tue, 7 Jan 2020 11:26:55 -0500
Subject: [PATCH] Update user module to support no_log=False. (#66219)

Updates the user module to support pull request #64733. Neither the
update_password or password_lock field contains sensitive information, so
mark them as such.
---
 changelogs/fragments/66219-update-user-module-for-64733.yml | 2 ++
 lib/ansible/modules/system/user.py                          | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 create mode 100644 changelogs/fragments/66219-update-user-module-for-64733.yml

diff --git a/changelogs/fragments/66219-update-user-module-for-64733.yml b/changelogs/fragments/66219-update-user-module-for-64733.yml
new file mode 100644
index 00000000000..5a8cc9c2268
--- /dev/null
+++ b/changelogs/fragments/66219-update-user-module-for-64733.yml
@@ -0,0 +1,2 @@
+bugfixes:
+  - "update ``user`` module to support silencing ``no_log`` warnings in the future (see: https://github.com/ansible/ansible/pull/64733)"
diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py
index f12542b3a88..6f4b8d0b113 100644
--- a/lib/ansible/modules/system/user.py
+++ b/lib/ansible/modules/system/user.py
@@ -2858,9 +2858,9 @@ def main():
             ssh_key_file=dict(type='path'),
             ssh_key_comment=dict(type='str', default=ssh_defaults['comment']),
             ssh_key_passphrase=dict(type='str', no_log=True),
-            update_password=dict(type='str', default='always', choices=['always', 'on_create']),
+            update_password=dict(type='str', default='always', choices=['always', 'on_create'], no_log=False),
             expires=dict(type='float'),
-            password_lock=dict(type='bool'),
+            password_lock=dict(type='bool', no_log=False),
             local=dict(type='bool'),
             profile=dict(type='str'),
             authorization=dict(type='str'),