Hi,
I'm working on a public puppet module and while I've done a lot of
improvements up to now (especially considering my puppet capabilities),
there is still a lot of work to do and I'd need some help for my next step.
My repo is https://github.com/ubellavance/ZendServerPuppet and my next
target is to make sure that an application action is not done before the
bootstrap is complete. Explanations: the module performs a "bootstrap"
process at the first puppet run (just after installing the packages). If I
set an application action (define, for example) before the bootstrap
process is complete (which would obviously happen), there is an error with
obscure error messages provided by the Zend Server API, which isn't really
user-friendly and it causes a failure of the puppet run. There is a fact
that is set to true if the bootstrap is complete: $::zend_gui_completed. I
tried doing a conditional statement using this variable but I don't know
how to just do nothing for the application action and just output a message
(notify) saying that the application actions will be applied after the
bootstrap. It is a bit tricky because before the bootstrap it doesn't
exist, so it is undefined, and once the bootstrap is complete, it equals to
true.
I tried this, in application.pp, but it looks like the if doesn't work
because the notify occurs every time
if $::zend_gui_completed != true {
notify {"zend_gui_completed = $::zend_gui_completed. Bootstrap must run
first. Application settings will be applied after Bootstrap is done": }
}
Here's the output:
Notice:
/Stage[main]/Main/Node[default]/Zendserver::Application[patate]/Notify[zend_gui_completed
= true. Bootstrap must run first. Application settings will be applied
after Bootstrap is done]/message: defined 'message' as 'zend_gui_completed
= true. Bootstrap must run first. Application settings will be applied
after Bootstrap is done'
Could someone help me figure out how to make the if work, and, even more
important, if there is a way to "bypass" the zendserver::application blocks
if zend_gui_completed is not true?
Here's my application::define:
zendserver::application { 'patate':
ensure => 'define',
base_url => "http://patate.com",
version => "2",
logo => "/usr/share/pixmaps/poweredby.png"
}
Please let me know if you need more information.
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/e22e885d-5342-4432-8cb9-f030ea0483f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.