blob: 7bae08afb35f392d25c311e3a7c88008da100853 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# common/manifests/defines/link.pp -- create a link
#
# Copyleft (C) 2009 immerdaadmin <admin@immerda.ch>
# See LICENSE for the full license granted to you.
# Usage:
# link { "/usr/bin/convert": target => "/usr/local/bin/convert" }
# e.g. equivalent to bash# ln -s /usr/bin/convert /usr/local/bin/convert
define link(
$target = 'absent'
) {
if ($target != 'absent') {
file { "$name":
ensure => link,
target => "${target}"
}
}else{
file { "$name":
ensure => absent,
recurse => true,
force => true
}
}
}
|