Skip to content

Commit

Permalink
Merge pull request #24 from torrancew/feature/allowdupe
Browse files Browse the repository at this point in the history
feature/allowdupe - fixes #23
  • Loading branch information
Tray committed Mar 8, 2014
2 parents 254e1cb + 00a6521 commit 81000dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
# Defaults to 'users'
# WARNING: Has no effect if used with $create_group = true
#
# [*allowdupe*]
# Whether to allow duplicate UIDs.
# Defaults to false.
# Valid values are true, false, yes, no.
#
# === Examples
#
# account { 'sysadmin':
Expand All @@ -95,7 +100,7 @@
$manage_home = true, $home_dir = undef, $home_dir_perms = '0750',
$create_group = true, $system = false, $uid = undef, $ssh_key = undef,
$ssh_key_type = 'ssh-rsa', $groups = [], $ensure = present,
$comment= "${title} Puppet-managed User", $gid = 'users'
$comment= "${title} Puppet-managed User", $gid = 'users', $allowdupe = false
) {

if $home_dir == undef {
Expand Down Expand Up @@ -173,6 +178,7 @@
home => $home_dir_real,
managehome => $manage_home,
system => $system,
allowdupe => $allowdupe,
}

file {
Expand Down
3 changes: 3 additions & 0 deletions spec/defines/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'home' => "/home/#{title}",
'managehome' => true,
'system' => false,
'allowdupe' => false,
'before' => "File[#{title}_home]",
})
end
Expand Down Expand Up @@ -62,6 +63,7 @@
:home_dir_perms => '0700',
:system => true,
:uid => 777,
:allowdupe => true,
:groups => [ 'sudo', 'users' ],
}}

Expand All @@ -83,6 +85,7 @@
'home' => params[:home_dir],
'manage_home' => params[:manage_home] == false ? nil : true,
'system' => params[:system],
'allowdupe' => params[:allowdupe],
})
end

Expand Down

0 comments on commit 81000dc

Please sign in to comment.