Skip to content

Commit 63a783c

Browse files
committed
Merge pull request #16 from bbriggs/add_gid_param
Add support for using GID parameter in local_user type
2 parents 190bb59 + e0220a2 commit 63a783c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ default to /bin/bash, /home/<username>, 90 days, 0 days, and null, respectively.
4242
managehome => true,
4343
comment => 'Real Name',
4444
groups => ['group1', 'group2'],
45+
gid => 'primary_group'
4546
last_change => '2015-01-01',
4647
password => 'encryptedstring',
4748
password_max_age => 90,

manifests/init.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
$groups,
3232
$password,
3333
$uid = undef,
34+
$gid = $name,
3435
$last_change = 0,
3536
$password_max_age = 90,
3637
$shell = '/bin/bash',
@@ -54,6 +55,7 @@
5455
validate_re("${last_change}", '^(\d+|\d+-\d+-\d+)$') #lint:ignore:only_variable_string
5556
validate_integer($password_max_age)
5657
validate_string($home)
58+
validate_string($gid)
5759
if ($uid) {
5860
validate_integer($uid)
5961
}
@@ -66,6 +68,7 @@
6668
groups => $groups,
6769
password_max_age => $password_max_age,
6870
uid => $uid,
71+
gid => $gid,
6972
}
7073
if ($ssh_authorized_keys) {
7174
local_user::ssh_authorized_keys{$ssh_authorized_keys:

0 commit comments

Comments
 (0)