Relative Symlinks

377 views
Skip to first unread message

Douglas Garstang

unread,
Mar 21, 2012, 12:59:50 PM3/21/12
to Puppet Users
Is there any way to get relative symlinks in puppet?

This:

file {
"tomcat-current":
#"/opt/foo/apache-tomcat-current":
ensure => link,
target => "/opt/foo/apache-tomcat-${tomcat_version}";
}

yields:

Wed Mar 21 09:58:05 -0700 2012 Puppet (err): Failed to apply catalog:
Parameter path failed: File paths must be fully qualified, not
'tomcat-current' at
/etc/puppet/env/development/modules/tomcat7/manifests/server.pp:18

Doug

Christopher Wood

unread,
Mar 21, 2012, 1:04:16 PM3/21/12
to puppet...@googlegroups.com
$ cat /tmp/symlink.pp
file { '/tmp/link_to_zz':
ensure => link,
target => 'zz',
}
$ puppet /tmp/symlink.pp
notice: /Stage[main]//File[/tmp/link_to_zz]/ensure: created
$ ls -l /tmp/link_to_zz
lrwxrwxrwx 1 cwood cwood 2 Mar 21 13:03 /tmp/link_to_zz -> zz

(ln target linkname)

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

Douglas Garstang

unread,
Mar 21, 2012, 1:17:37 PM3/21/12
to puppet...@googlegroups.com
Thanks.

--
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.g...@gmail.com
Cell: +1-805-340-5627

Reply all
Reply to author
Forward
0 new messages