summaryrefslogtreecommitdiff
path: root/manifests/defines/puppet_install.pp
blob: b6e52883b21258a4e68e73e414a9b380fd187b91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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,
	}
}