Created
August 24, 2014 12:48
-
-
Save maraca/a9fea217e975ab681cbf to your computer and use it in GitHub Desktop.
search for a statsd node using chef-zero and kitchen-ci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment = node.chef_environment | |
role = 'statsd' | |
# search for statsd host | |
statsd_host = search(:node, "roles:#{role} AND chef_environment:#{environment}").sort.first | |
puts statsd_host['ipaddress'] | |
> 10.0.0.75 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment