- From: Peter Donald <
>
- To:
- Subject: [chef] Re: Re: Re: automatically updating attributes visible to all nodes
- Date: Fri, 10 Feb 2012 07:41:29 +1100
On Fri, Feb 10, 2012 at 7:36 AM,
<
>
wrote:
>
On Thu, 09 Feb 2012, Jesse Nelson wrote:
>
>
> search seems like the right thing here.
>
>
but, the attr for which the clients would search, how would i populate
>
that attr in the first place? and how would i update that attr
>
automatically when a mon server's IP changes? that's what i don't get.
>
>
oh wait.. i think i just got it. a new mon server updates its own node's
>
attributes. but those attributes are searchable from all nodes. is
>
that it?
Correct. The code will look something like
mon_server_ip = nil
search(:node, 'roles:mo_server') do |n|
mon_server_ip = n['ipaddress']
end
--
Cheers,
Peter Donald
Archive powered by MHonArc 2.6.16.