aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-11-18 23:34:39 +0100
committerMicah Anderson <micah@riseup.net>2010-09-02 18:14:02 -0400
commitd39201f8a224f1dd153818948d72f4c87d3fdf81 (patch)
tree217bb0dace0469b318ff278a9694247ace7a68ac /manifests
parent2a679f8fa07e050180c49a58012c9783971f5aa1 (diff)
downloadpuppet-common-d39201f8a224f1dd153818948d72f4c87d3fdf81.tar.gz
puppet-common-d39201f8a224f1dd153818948d72f4c87d3fdf81.tar.bz2
make the define much easier
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/link.pp18
1 files changed, 2 insertions, 16 deletions
diff --git a/manifests/defines/link.pp b/manifests/defines/link.pp
index 7bae08a..e8e4a9f 100644
--- a/manifests/defines/link.pp
+++ b/manifests/defines/link.pp
@@ -7,20 +7,6 @@
# 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
- }
- }
+define link($target = absent) {
+ file{$name: ensure => $target; }
}
-