summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authordavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 07:57:50 +0000
committerdavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 07:57:50 +0000
commit5c3b366b7b1d4347b3a596019a50482b849d16a6 (patch)
treec70b84cca69c5a766021623b0ac6357ae885b4f4 /manifests
parent8c60b89c054d3ac391726385a26daa12cd4bf059 (diff)
add defines to install facts and functions; try it in ldap module
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@175 f03ff2f1-f02d-0410-970d-b9634babeaa1
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/puppet_install.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/manifests/defines/puppet_install.pp b/manifests/defines/puppet_install.pp
new file mode 100644
index 0000000..b6e5288
--- /dev/null
+++ b/manifests/defines/puppet_install.pp
@@ -0,0 +1,22 @@
+# puppet_install.pp -- install puppet functions and facter facts
+# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
+# See LICENSE for the full license granted to you.
+
+define puppet::function($source) {
+ $destination = $type ? {
+ "fact" => "${rubysitedir}/facter/${name}.rb",
+ }
+ file {
+ "${rubysitedir}/puppet/parser/functions/${name}.rb":
+ source => $source,
+ mode => 755, owner => root, group => root,
+ }
+}
+
+define puppet::fact($source) {
+ file {
+ "${rubysitedir}/facter/${name}.rb":
+ source => $source,
+ mode => 755, owner => root, group => root,
+ }
+}