Skip to content

Instantly share code, notes, and snippets.

@ripienaar
Last active November 18, 2015 12:14
Show Gist options
  • Save ripienaar/7131d2952f64f0cbd646 to your computer and use it in GitHub Desktop.
Save ripienaar/7131d2952f64f0cbd646 to your computer and use it in GitHub Desktop.
find hieradb -name \*.yaml|xargs ./validate_yaml.rb
#!/usr/bin/env ruby
require 'yaml'
ARGV.each do |file|
if File.exist?(file)
puts file
begin
YAML.load_file(file)
rescue
puts "Failed: %s" % $!.to_s
end
else
puts "%s does not exist, skipping test" % file
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment