Need help getting Node IP


#1

Help…

execute “consul-join” do
command "consul join "
action :run
end


Justin Franks
Lead Operations Engineer
SaaS, Cloud, Data Centers & Infrastructure
Lithium Technologies, Inc
225 Bush St., 15th Floor
San Francisco, CA 94104
tel: +1 415 757 3100 x3219


#2

You’d need to perform a chef search for the target node by name or role:

consul_nodes = search(:node, ‘role:consul_whatever’)

if consul_nodes
execute “consul-join” do
command "consul join #{consul_nodes.first.ipaddress}"
action :run
end
end

On Monday, July 14, 2014 at 11:38 AM, Justin Franks wrote:

Help…
execute “consul-join” do
command "consul join "
action :run
end


Justin Franks
Lead Operations Engineer
SaaS, Cloud, Data Centers & Infrastructure
Lithium Technologies, Inc
225 Bush St., 15th Floor
San Francisco, CA 94104
tel: +1 415 757 3100 x3219


#3

Thanks Daniel.


Justin Franks
Lead Operations Engineer
SaaS, Cloud, Data Centers & Infrastructure
Lithium Technologies, Inc
225 Bush St., 15th Floor
San Francisco, CA 94104
tel: +1 415 757 3100 x3219


From: Daniel Condomitti daniel@condomitti.com
Sent: Monday, July 14, 2014 11:43 AM
To: chef@lists.opscode.com
Subject: [chef] Re: Need help getting Node IP

You’d need to perform a chef search for the target node by name or role:

consul_nodes = search(:node, ‘role:consul_whatever’)

if consul_nodes
execute “consul-join” do
command "consul join #{consul_nodes.first.ipaddress}"
action :run
end
end

On Monday, July 14, 2014 at 11:38 AM, Justin Franks wrote:

Help…

execute “consul-join” do
command "consul join "
action :run
end


Justin Franks
Lead Operations Engineer
SaaS, Cloud, Data Centers & Infrastructure
Lithium Technologies, Inc
225 Bush St., 15th Floor
San Francisco, CA 94104
tel: +1 415 757 3100 x3219