diff --git a/system/user.py b/system/user.py index ee1cc5d2a3a..2bb017da078 100644 --- a/system/user.py +++ b/system/user.py @@ -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):