On Sunday, March 3, 2013 8:00:35 AM UTC-6, Andrei Burd wrote:
>
> Hi, i'm writing a define to custom apache configuration, with nagios 
> check, using Geppeto.
>
> I want to define a parameter to check specific web page for ssl, because 
> not all the site are available trough SSL, just couple of pages. 
> I'm using previously declared parameters to build the whole string:
>
> The thing is it's working great, but Geppeto marks it as uninitialized 
> variable:
>
> define platform::create (
>
> .......
> $ssl_iface = $::ipaddress,
> $ssl_page = "/",
> $nagioscheckssl = "check_https_other_string_sane!${ssl_iface}!
> www.${name}!${ssl_page}!${name}!200<http://www.%24%7Bname%7D%21%24%7Bssl_page%7D%21%24%7Bname%7D%21200/>"
>  
> <---marked as error/uninitialized
> ............
> ]) {...}
> @hlindberg Pointed that it's miracle that it's working, and it's a mistake 
> and should not work.
>
> Please advice is it really not suppose to work and should i do other ways, 
> or to change the Geppetto behavior ?
>


Gepetto is right to flag an error.  Puppet does not support parameter 
defaults that use the values of other parameters of the same class or 
definition.  It does not flag a parse error at present, but the results are 
undefined.  Based on how I think the implementation works, you got lucky on 
a 33% chance that your default value would be interpreted as you intended.  
There is no guarantee that it will continue to work on a different version 
of Puppet or of the Ruby underneath, and it is likely to break if you add, 
remove, or rename parameters.


John

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to