From c57d70ad207e1c5a935f7af7a93a890f44e364d1 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 7 Jul 2015 12:06:52 -0700 Subject: [PATCH] Fix group mod and group add for FreeBSD --- system/group.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/group.py b/system/group.py index 53ab5f904dc..d97dd2176ac 100644 --- a/system/group.py +++ b/system/group.py @@ -233,7 +233,8 @@ class FreeBsdGroup(Group): def group_add(self, **kwargs): cmd = [self.module.get_bin_path('pw', True), 'groupadd', self.name] if self.gid is not None: - cmd.append('-g %d' % int(self.gid)) + cmd.append('-g') + cmd.append('%d' % int(self.gid)) return self.execute_command(cmd) def group_mod(self, **kwargs): @@ -241,7 +242,8 @@ class FreeBsdGroup(Group): info = self.group_info() cmd_len = len(cmd) if self.gid is not None and int(self.gid) != info[2]: - cmd.append('-g %d' % int(self.gid)) + cmd.append('-g') + cmd.append('%d' % int(self.gid)) # modify the group if cmd will do anything if cmd_len != len(cmd): if self.module.check_mode: