From 52332f5b78d2ecbe4368be9c52f0aaa52fc305e8 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 6 Oct 2016 11:52:03 -0400 Subject: [PATCH] allow groups to be passed as YAML list as well keeps backwards copat with 'comma delimited string' fixes #5163 --- 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 cb261c77771..4fbea3f1d0a 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -261,7 +261,7 @@ class User(object): self.non_unique = module.params['non_unique'] self.seuser = module.params['seuser'] self.group = module.params['group'] - self.groups = module.params['groups'] + self.groups = ','.join(module.params['groups']) self.comment = module.params['comment'] self.shell = module.params['shell'] self.password = module.params['password'] @@ -2079,7 +2079,7 @@ def main(): uid=dict(default=None, type='str'), non_unique=dict(default='no', type='bool'), group=dict(default=None, type='str'), - groups=dict(default=None, type='str'), + groups=dict(default=None, type='list'), comment=dict(default=None, type='str'), home=dict(default=None, type='path'), shell=dict(default=None, type='str'),