On Wed, Apr 20, 2011 at 10:51 AM, Gabriel Filion <lelu...@gmail.com> wrote: > Hello, > > On 11-04-20 01:02 PM, Martin Alfke wrote: >> On Apr 20, 2011, at 6:07 PM, Sans wrote: >>> Say for example, this is the package, already installed on the >>> system: >>> >>> # rpm -qa | grep lfc-libs >>> lfc-libs-1.8.0-1sec.sl5 >>> lfc-libs-1.8.0-1sec.sl5 >>> >>> and I want a symbolic: "liblfc.so -> libdpm.so.1.8.0" in "/opt/lfc/ >>> lib", for example. Is it possible? Cheers!! >> >> Setting symlinks is standard job for file resource type: >> >> file { '<source>': >> ensure => '<destination>' >> } >> >> Example.: >> >> file {'/etc/inetd.conf': >> ensure => 'etc/inet/inetd.conf' >> } >> >> This creates a symlink /etc/inetd.conf pointing to /etc/inet/inetd.conf > > the above will work fine, but using the "ensure" parameter to specify > the target path was deemed misleading and so an alternative was added. > > I suggest checking out this page for more info on the "file" resource type: > > http://docs.puppetlabs.com/references/stable/type.html#file > > However, from what I can see, the documentation about its "ensure" > parameter could use a little fine-tuning. Even though the first > parameter doesn't mention "link" as a valid value for "ensure", there is > an example of the alternative I'm describing in the first code box. > > Here's an example using the alternative method, which in my opinion > makes things clearer: > > # this should theroetically make a symlink relative to the current > # directory. You can also use absolute paths for the target. > file { '/opt/lfc/lib/liblfc.so': > ensure => link, > target => 'libdpm.so.1.8.0', > }
Gah. You just reminded me of a deprecation we planned to do for Statler but didn't get done. http://projects.puppetlabs.com/issues/4938 I always push the alternative syntax you've hinted at: file { "/tmp/foo": ensure => symlink, target => "/tmp/bar", } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.