- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Re: param[:name] bizarreness when nesting defines
- Date: Wed, 19 Jan 2011 10:56:32 -0500
On 19 January 2011 04:53, Matthias Marschall
<
>
wrote:
>
I can confirm that issue. Here is what failed for us:
>
>
iptables_rule "mysql_internal" do
>
variables :mysql_ip => internal_ip(node)
>
end
>
>
It works, if I do it like this:
>
>
mysql_ip = internal_ip(node)
>
iptables_rule "mysql_internal" do
>
variables :mysql_ip => mysql_ip
>
end
>
>
Can anyone shed any light on this one? It's an ugly pitfall
>
>
- Matthias
I believe this is known - the contents of the define are replaced with
the definitions contents (directly) so nested definitions always
clobber eachother.
Use an lwr/p
>
>
>
> I have my local runit recipe patched to configure svlogd-emitted log files
>
> as sources for remote logging. The obvious implementation is such:
>
>
>
> logged_file "#{sv_dir_name}/log/main/current" do
>
> tag "sv-#{params[:name]}"
>
> end
>
>
>
> However, when doing so, the tag gets instantiated as "sv-"
>
>
>
> If, however, I do the following:
>
>
>
> sv_name = params[:name]
>
> logged_file "#{sv_dir_name}/log/main/current" do
>
> tag "sv-#{sv_name}"
>
> end
>
>
>
> all works properly.
>
>
>
> WTF?!
>
>
Archive powered by MHonArc 2.6.16.