Created
June 22, 2012 15:12
-
-
Save ottomata/2973365 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/manifests/admins.pp b/manifests/admins.pp | |
index bf29a7b..705c050 100644 | |
--- a/manifests/admins.pp | |
+++ b/manifests/admins.pp | |
@@ -8,7 +8,7 @@ | |
# 1) set variable $enabled = "false" | |
# 2) set all ssh authorized keys to ensure => absent | |
-define unixaccount($username, $uid, $gid, $enabled="true") { | |
+define unixaccount($username, $uid, $gid, $enabled="true", $groups = []) { | |
if defined(Class["nfs::home"]) { | |
$manage_home = "false" | |
} else { | |
@@ -34,6 +34,7 @@ define unixaccount($username, $uid, $gid, $enabled="true") { | |
managehome => $manage_home, | |
allowdupe => false, | |
require => Group[$gid], | |
+ groups => $groups, | |
} | |
} | |
@@ -1936,7 +1937,12 @@ class accounts { | |
$username = "erosen" | |
$realname = "Evan Rosen" | |
$uid = 602 | |
- unixaccount { $realname: username => $username, uid => $uid, gid => $gid } | |
+ | |
+ group { "erosen": | |
+ gid => $uid, | |
+ } | |
+ | |
+ unixaccount { $realname: username => $username, uid => $uid, gid => $uid, groups => ["wikidev"] } | |
if $manage_home { | |
Ssh_authorized_key { require => Unixaccount[$realname] } | |
ssh_authorized_key { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment