cookbook 'discovery', '= 0.0.6', :supermarket
discovery (16) Versions 0.0.6 Follow6
Installs/Configures the discovery library
cookbook 'discovery', '= 0.0.6'
knife cookbook site install discovery
knife cookbook site download discovery
You can use the #search method to locate a role, optionally restricted to the environment.
It will fall back to searching the local nodes run_list for roles, so you can have less logic flow in recipes.
host = Discovery.search("any_role", :node => node, :environment_aware => false)
You can use the #ipaddress method to automatically grab a prioritised ipaddress from a node.
The remote node will be compared against the same node, if any are in any clouds detected by ohai (and they are in the same cloud) the local ipv4 will be returned.
You can optionally supply a type argument specifying which ipaddress you would like.
ipaddress = Discovery.ipaddress(:remote_node => host, :node => node)
local_ipv4 = Discovery.ipaddress(:remote_node => host, :node => node, :type => :local)
public_ipv4 = Discovery.ipaddress(:remote_node => host, :node => node, :type => :public)
This cookbook has no specified dependencies.