Hi,
I needed a function to check if a file is existing on the Debian box I
am configuring. So I used this one
module Puppet::Parser::Functions
newfunction(:file_exists, :type => :rvalue) do |args|
if File.exists?(args[0])
return 1
else
return 0
end
end
end
It work greats for some service where apache2 doesn't work for me.
I am using it this way "file_exists('/etc/init.d/apache2') == 1" if
this return true I will stop the service or do nothing.
In my case, the file /etc/init.d/apache2 exists on the puppet master
running through Passenger, but the puppet client doesn't have it.
But when I run the puppetd -vt it returns me an error because it's
thinking the file /etc/init.d/apache2 exists on the puppet client and
tries to stop the service.
do you have any idea, is there a caching system on puppet client where
we could delete a cached function?
Thank you!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.