user: Cast all arguments to string before passing to run_command (#4398)

Fixes #4397
This commit is contained in:
jctanner 2016-08-11 19:16:24 -04:00 committed by GitHub
parent 6b166a76c4
commit 4047096ac4

View file

@ -300,6 +300,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):