Last active
November 18, 2015 12:14
-
-
Save ripienaar/7131d2952f64f0cbd646 to your computer and use it in GitHub Desktop.
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
find hieradb -name \*.yaml|xargs ./validate_yaml.rb |
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
#!/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