Skip to content

Instantly share code, notes, and snippets.

@iroller
Created January 9, 2012 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iroller/1583983 to your computer and use it in GitHub Desktop.
Save iroller/1583983 to your computer and use it in GitHub Desktop.
knife search
$ knife exec -E 'search(:node, "addresses:10.10.0.80").each {|node| puts node[:fqdn]}'
<0 results>
$ knife search node 'addresses:10.10.0.80'
<0 results>
$ knife search node 'network_interfaces_*_addresses:10.10.0.80'
1 items found
WHY?!
for some other nodes it works ok:
$ knife exec -E 'search(:node, "addresses:10.10.0.82").each {|node| puts node[:fqdn]}'
my-awesome-node-fqdn
$ knife search node 'addresses:10.10.0.82'
1 items found
$ knife search node 'network_interfaces_*_addresses:10.10.0.82'
1 items found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment