summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-12-05 14:44:27 +0000
committermh <mh@immerda.ch>2008-12-05 14:44:27 +0000
commit9e55abd8b92e538c9b08cceca54a385e952be34a (patch)
tree5399a980dad7761eb847f4e1e8962baff246d4d9
parent795a719e019e5682f4c8bdc821ee0ae1a3aa2058 (diff)
merged with puzzle
-rw-r--r--manifests/defines.pp6
-rw-r--r--plugins/puppet/parser/functions/mkpasswd.rb6
2 files changed, 9 insertions, 3 deletions
diff --git a/manifests/defines.pp b/manifests/defines.pp
index bc5793a..36067a1 100644
--- a/manifests/defines.pp
+++ b/manifests/defines.pp
@@ -15,15 +15,15 @@
# Note: If you'd like to use unencrypted passwords, you have to set a variable
# $password_salt to an 8 character long salt, being used for the password.
# gid: define the gid of the group
-# absent: let the system take a gid (*default*)
-# uid: take the same as the uid has if it isn't absent
+# absent: let the system take a gid
+# uid: take the same as the uid has if it isn't absent (*default*)
# <value>: take this gid
# manage_group: Wether we should add a group with the same name as well
# Default: true
define user::managed(
$name_comment = 'absent',
$uid = 'absent',
- $gid = 'absent',
+ $gid = 'uid',
$groups = [],
$manage_group = 'true',
$membership = 'minimum',
diff --git a/plugins/puppet/parser/functions/mkpasswd.rb b/plugins/puppet/parser/functions/mkpasswd.rb
new file mode 100644
index 0000000..645df9b
--- /dev/null
+++ b/plugins/puppet/parser/functions/mkpasswd.rb
@@ -0,0 +1,6 @@
+# needs an 8-char salt *always*
+module Puppet::Parser::Functions
+ newfunction(:mkpasswd, :type => :rvalue) do |args|
+ %x{/usr/bin/mkpasswd -H MD5 #{args[0]} #{args[1]}}.chomp
+ end
+end