[Puppet Users] Re: fully qualified array of variables

jcbollinger
Mon, 05 Mar 2012 14:34:53 -0000

On Mar 4, 4:47 am, Eslam Mamdouh <emamd...@cloud9ers.com>
wrote:
> $replicas works now by replacing
>
> <% if
has_variable?(scope.lookupvar(''class_name::params::replicas''))
then %>
>
> with
>
> > <% if has_variable?("class_name::params::replicas") then
%>
>
> but the problem now with $dbhost variable "else condition"
> i got that error after defining $mongodb variable instead of
> mongodb_replicas in nodes.pp
>
> > undefined method `join'' for :undef:Symbol
>
> any ideas ?


As far as I can tell, nothing in your else block invokes a
''join''
method, so I have to assume that either you have mischaracterized the
error case or you have not shown the real template code.  We will be
able to help you better if you reduce the problem to a simpler test
case, and present not only the template code but also all the relevant
classes.  A one-line template and a five-line class would be
sufficient to test join()ing a host array in a template.


John