chakkerz
2009-Feb-18 21:38 UTC
[Puppet Users] symlink issue - creates fine initially, but subsequent errors
Hello there I have a bit of code which (originally) generated a symlink, based on the example in http://reductivelabs.com/trac/puppet/wiki/TypeReference#file which worked fine to create the link. the problem is that when i run this i get: err: //Node[default]/defaultnode/shared-default/bigbrother/File[/var/ bb/bb]/target: change from notlink to /var/bb/bbc1.9e-btf failed: Could not remove existing file My code is actually: file { "/var/bb/bb": ensure => [ present, "/var/bb/ $bbVersion" ], require => file["/var/bb/$bbVersion"], } This is post modification to avoid this error, instead of "present" i''ve tried also tried "link". The problem is this: the creation of the symlink is a step in my order of execution, which means because it fails, subsequent steps are not attempted: warning: //Node[default]/defaultnode/shared-default/bigbrother/File[/ var/bb/bbc1.9e-btf.linux/bin]: Skipping because of failed dependencies So, how do I request the creation of the link if not there, and ignore its creation of already present. force => "true", seems (sounds) heavy handed..., though it does the trick: file { "/var/bb/bb": force => "true", ensure => "/var/bb/$bbVersion", require => file["/var/bb/$bbVersion"], } Cheers, chakkerz --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---