ripienaar / puppet-reportprint Goto Github PK
View Code? Open in Web Editor NEWCLI Viewer for Puppet Reports
License: Other
CLI Viewer for Puppet Reports
License: Other
With the following report:
https://gist.github.com/roidelapluie/5049d83253b382406fd7
I get
Report for fna060.ant.inuits.lab in environment example at 2016-03-14 11:36:36 +0100
Report File: last_run_report.yaml
Report Kind: apply
Puppet Version: 4.3.2
Report Format: 4
Configuration Version:
UUID: 5432ba46-f86c-4fbe-9282-71ad86ce1943
Log Lines: 7 (show with --log)
Report Metrics:
report_print.rb:65:in `print_report_metrics': undefined method `+' for nil:NilClass (NoMethodError)
from report_print.rb:198:in `<main>'
root # ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
root # puppet -V
3.7.4
root #./report_print.rb --nodelist
./report_print.rb:76: syntax error, unexpected ')'
I got several syntax errors:
root@puppet1:/usr/bin# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux]
root@puppet1:/usr/bin# puppet --version
3.6.2
root@puppet1:/usr/bin# ruby -c report_print.rb
report_print.rb:40: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
...= {:red => " return "%s%s%s%s" % [colors.fetch(code, ""), m...
... ^
report_print.rb:46: syntax error, unexpected tCONSTANT, expecting keyword_end
puts color(:bold, "Report for %s in environment %s at ...
^
report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting tCOLON2 or '[' or '.'
..., "Report for %s in environment %s at %s" % [color(:underlin...
... ^
report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
...ort for %s in environment %s at %s" % [color(:underline, rep...
... ^
report_print.rb:48: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Report File: %s" % @options[:report]
^
report_print.rb:49: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Report Kind: %s" % report.kind
^
report_print.rb:50: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Puppet Version: %s" % report.puppet_version
^
report_print.rb:51: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Report Format: %s" % report.report_format
^
report_print.rb:52: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Configuration Version: %s" % report.configuration_version
^
report_print.rb:53: syntax error, unexpected tCONSTANT, expecting keyword_end
... puts " UUID: %s" % report.transaction_uu...
... ^
report_print.rb:54: syntax error, unexpected tCONSTANT, expecting keyword_end
puts " Log Lines: %s %s" % [report.logs...
^
report_print.rb:65: syntax error, unexpected keyword_do_block, expecting keyword_end
report.metrics.sort_by{|i, m| m.label}.each do |i, metric|
^
report_print.rb:65: syntax error, unexpected '|', expecting '='
report_print.rb:68: syntax error, unexpected keyword_do_block, expecting keyword_end
metric.values.sort_by{|i, m, v| v}.reverse.each do |i, m, v|
^
report_print.rb:68: syntax error, unexpected '|', expecting '='
report_print.rb:73: syntax error, unexpected keyword_end, expecting $end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.