I'm having trouble getting puppet to work when using a conditional to
check whether or not a subclass is defined.
Here is what I've tried to do
if ! defined (Class[server::cobbler]) {
# do something
}
With the above statement I get this error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Syntax error at 'server::cobbler'; expected ']' at ...
So I tried quoting the class:
if ! defined (Class["server::cobbler"]) {
# do something
}
This doesn't error out, but it doesn't do what I'm asking which is to
only run the section of code when the subclass server::cobbler is not
defined.
Any ideas?
--
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.