From 2e392f47c891f03f6bf685b2fa1353fcf3b7208f Mon Sep 17 00:00:00 2001 From: Anton Kasimov Date: Sat, 20 May 2017 15:41:24 +0300 Subject: [PATCH] Bugfix for setting user groups on OpenBSD --- lib/ansible/modules/system/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 4b730579347..d8fad5c353a 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -1028,7 +1028,7 @@ class OpenBSDUser(User): if self.groups is not None: current_groups = self.user_group_membership() groups_need_mod = False - groups_option = '-G' + groups_option = '-S' groups = [] if self.groups == '': @@ -1042,7 +1042,7 @@ class OpenBSDUser(User): if self.append: for g in groups: if g in group_diff: - groups_option = '-S' + groups_option = '-G' groups_need_mod = True break else: