diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d505aec7a6..8c6851f5f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,8 @@ Ansible Changes By Release https://github.com/ansible/ansible/pull/32262 * Clarified package docs on 'latest' state https://github.com/ansible/ansible/pull/32397 +* Fix issue with user module when local is true + (https://github.com/ansible/ansible/pull/32262 and https://github.com/ansible/ansible/pull/32411) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index b1f1f46930a..1f1677405e2 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -420,10 +420,7 @@ class User(object): cmd.append(self.password) if self.createhome: - cmd.append('-m') - if self.local: - cmd.append('-M') - else: + if not self.local: cmd.append('-m') if self.skeleton is not None: