diff options
author | Sean Chittenden <seanc@groupon.com> | 2015-07-07 12:06:52 -0700 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-07-07 15:45:53 -0400 |
commit | a64270badc6bb4f6a506f37af632ca255215ad5f (patch) | |
tree | e0b337ef5d8bdb8312e2b646020081caf0a4a27c | |
parent | 6906760d46b8afb884c5340415a17df315afd1b2 (diff) | |
download | ansible-modules-core-a64270badc6bb4f6a506f37af632ca255215ad5f.tar.gz |
Fix group mod and group add for FreeBSD
-rwxr-xr-x | system/group.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/group.py b/system/group.py index 83ea410b..282e7f4a 100755 --- 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: |