summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2016-11-02 10:15:51 -0400
committerBrian Coca <brian.coca+git@gmail.com>2016-11-02 10:16:26 -0400
commit76fd19c3cad3c1f5db66aa6668ffcfe01bb5ac2c (patch)
tree5ee8ab093057c6054d009cb436ad74fa75f1174a
parentebc3a0628fe752e3d650b2d62b9b267a3086c425 (diff)
downloadansible-modules-core-76fd19c3cad3c1f5db66aa6668ffcfe01bb5ac2c.tar.gz
dont join when group is none
-rw-r--r--system/user.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/user.py b/system/user.py
index fd60b4f0..c424beea 100644
--- a/system/user.py
+++ b/system/user.py
@@ -263,7 +263,6 @@ class User(object):
self.non_unique = module.params['non_unique']
self.seuser = module.params['seuser']
self.group = module.params['group']
- self.groups = ','.join(module.params['groups'])
self.comment = module.params['comment']
self.shell = module.params['shell']
self.password = module.params['password']
@@ -283,6 +282,10 @@ class User(object):
self.update_password = module.params['update_password']
self.home = module.params['home']
self.expires = None
+ self.groups = None
+
+ if module.params['groups'] is not None:
+ self.groups = ','.join(module.params['groups'])
if module.params['expires']:
try: