Removing links

378 views
Skip to first unread message

John Kennedy

unread,
May 31, 2011, 5:58:44 AM5/31/11
to puppet...@googlegroups.com
I have a group of web servers being load balanced. I have 4 types of servers all build from the same image. 
When I build the image I forgot to clear out one of the sym links from sites-enabled to sites-available. This is causing problems with the web servers. I have tried to have puppet remove the link but have had little success. I have tried the following:
file { "/opt/nginx/sites-enabled/<site file": ensure => absent }
This will remove a file if it is there but not this link.
What am I missing? I have googled to get the above which I thought would remove the link.
Thanks,
John

--
 John Kennedy

jcbollinger

unread,
May 31, 2011, 8:55:21 AM5/31/11
to Puppet Users
ensure => absent is what I would expect to work, too. Does that
parameter actually end up in the catalog for the node(s) you are
testing? If so, then what message, if any, does the Puppet agent log
about it?

Crazy idea: does the link target exist? If not, then what happens if
you create it first? It would be a bug if Puppet won't remove broken
links, but I can imagine a couple of ways that such a bug could creep
in.


John

Nick Lewis

unread,
May 31, 2011, 1:36:14 PM5/31/11
to puppet...@googlegroups.com
Which Puppet version are you using? This looks similar to #6856 which was fixed in 2.6.8. It could also be #4932.
 
--
 John Kennedy

--
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.

John Kennedy

unread,
Jun 1, 2011, 10:49:10 AM6/1/11
to puppet...@googlegroups.com


On Tue, May 31, 2011 at 18:36, Nick Lewis <ni...@puppetlabs.com> wrote:

On Tuesday, May 31, 2011 at 2:58 AM, John Kennedy wrote:

I have a group of web servers being load balanced. I have 4 types of servers all build from the same image. 
When I build the image I forgot to clear out one of the sym links from sites-enabled to sites-available. This is causing problems with the web servers. I have tried to have puppet remove the link but have had little success. I have tried the following:
file { "/opt/nginx/sites-enabled/<site file": ensure => absent }
This will remove a file if it is there but not this link.
What am I missing? I have googled to get the above which I thought would remove the link.
Thanks,
John

Which Puppet version are you using? This looks similar to #6856 which was fixed in 2.6.8. It could also be #4932.
 


The puppet master is 2.6.4. The nodes are running 2.6.8.

--
 John Kennedy

Reply all
Reply to author
Forward
0 new messages