Skip to content

Instantly share code, notes, and snippets.

@jrich523
Created June 11, 2018 17:52
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 jrich523/634bcc92a94568de0aa6a0fc509c3944 to your computer and use it in GitHub Desktop.
Save jrich523/634bcc92a94568de0aa6a0fc509c3944 to your computer and use it in GitHub Desktop.
nodes.each do |line|
if line['facts'].key?("kvm")
if line['facts'].key?("processorcount")
if line['facts']['kvm'].key?("usedvcpus")
if line['facts']['kvm'].key?("usedmem")
if line['facts']['kvm'].key?("availmem")
if line['facts']['kvm'].key?("pool")
if line['facts']['kvm']['pool'].key?("default")
if line['facts']['kvm']['pool']['default'].key?("available")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment