Skip to content

Instantly share code, notes, and snippets.

@sean-horn
Last active August 29, 2015 14:22
Show Gist options
  • Save sean-horn/cdca252867d7b11d3dfa to your computer and use it in GitHub Desktop.
Save sean-horn/cdca252867d7b11d3dfa to your computer and use it in GitHub Desktop.
Failing search?
exit unless ARGV.length == 3
nodename = ARGV[2]
50.times do
%w{role1 role2}.each do |currentrole|
n = nodes.load(nodename)
n.run_list("role[#{currentrole}]")
n.save
n = nodes.load(nodename)
if ! n.run_list.roles.include?(currentrole)
puts "FAILURE!!!!"
else
puts "ok"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment