From 6c439a4882dbd31b10f7b947db01cb5dc8096e6e Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 11 Aug 2016 19:16:24 -0400 Subject: [PATCH] user: Cast all arguments to string before passing to run_command (#4398) Fixes #4397 --- lib/ansible/modules/system/user.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index bd9c8f6f649..7776b2e4a14 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -299,6 +299,8 @@ class User(object): self.module.debug('In check mode, would have run: "%s"' % cmd) return (0, '','') else: + # cast all args to strings ansible-modules-core/issues/4397 + cmd = [str(x) for x in cmd] return self.module.run_command(cmd, use_unsafe_shell=use_unsafe_shell, data=data) def remove_user_userdel(self):