Skip to content

Instantly share code, notes, and snippets.

@roidelapluie
Last active September 3, 2015 13:30
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 roidelapluie/5a6e15fa9a4cd49d9fb8 to your computer and use it in GitHub Desktop.
Save roidelapluie/5a6e15fa9a4cd49d9fb8 to your computer and use it in GitHub Desktop.
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event.rb:40:in `initialize_from_hash': undefined method `[]' for #<Puppet::Transaction::Event:0x0000000341e3f0> (NoMethodError)
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event.rb:24:in `from_data_hash'
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/status.rb:190:in `block in initialize_from_hash'
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/status.rb:185:in `map'
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/status.rb:185:in `initialize_from_hash'
from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/psych_support.rb:22:in `init_with'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:346:in `init_with'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:338:in `revive'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:203:in `visit_Psych_Nodes_Mapping'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:15:in `visit'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:5:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:31:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:302:in `block in revive_hash'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `each'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `each_slice'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `revive_hash'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:161:in `visit_Psych_Nodes_Mapping'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:15:in `visit'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:5:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:31:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:302:in `block in revive_hash'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `each'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `each_slice'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:300:in `revive_hash'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:338:in `revive'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:203:in `visit_Psych_Nodes_Mapping'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:15:in `visit'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:5:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:31:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:276:in `visit_Psych_Nodes_Document'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:15:in `visit'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/visitor.rb:5:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/visitors/to_ruby.rb:31:in `accept'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych/nodes/node.rb:37:in `to_ruby'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych.rb:246:in `load'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych.rb:464:in `block in load_file'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych.rb:464:in `open'
from /opt/puppetlabs/puppet/lib/ruby/2.1.0/psych.rb:464:in `load_file'
from ./ipm-puppet-report:20:in `load_report'
from ./ipm-puppet-report:23:in `<main>'
#!/opt/puppetlabs/puppet/bin/ruby
#
# Copyright 2013 R.I.Pienaar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'puppet'
def load_report(path)
YAML.load_file(path)
end
load_report('test.yaml')
--- !ruby/object:Puppet::Transaction::Report
metrics:
resources: !ruby/object:Puppet::Util::Metric
name: resources
label: Resources
values:
- - total
- Total
- 284
- - skipped
- Skipped
- 0
- - failed
- Failed
- 0
- - failed_to_restart
- Failed to restart
- 0
- - restarted
- Restarted
- 0
- - changed
- Changed
- 8
- - out_of_sync
- Out of sync
- 8
- - scheduled
- Scheduled
- 0
time: !ruby/object:Puppet::Util::Metric
name: time
label: Time
values:
- - package
- Package
- 0.589971514
- - group
- Group
- 0.00176443
- - user
- User
- 0.002258249
- - file
- File
- 0.48271304900000006
- - augeas
- Augeas
- 0.10746718499999998
- - anchor
- Anchor
- 0.000572255
- - exec
- Exec
- 0.26170788700000003
- - acl
- Acl
- 0.185767883
- - service
- Service
- 0.115158542
- - cron
- Cron
- 0.000783213
- - filebucket
- Filebucket
- 0.000107776
- - config_retrieval
- Config retrieval
- 9.270076333
- - total
- Total
- 11.018348316
changes: !ruby/object:Puppet::Util::Metric
name: changes
label: Changes
values:
- - total
- Total
- 8
events: !ruby/object:Puppet::Util::Metric
name: events
label: Events
values:
- - total
- Total
- 8
- - failure
- Failure
- 0
- - success
- Success
- 8
logs:
- !ruby/object:Puppet::Util::Log
level: :info
tags: !ruby/object:Puppet::Util::TagSet
hash:
info: true
message: Retrieving pluginfacts
source: Puppet
time: 2015-09-03 14:40:46.353548658 +02:00
- !ruby/object:Puppet::Util::Log
level: :notice
tags: !ruby/object:Puppet::Util::TagSet
hash:
notice: true
message: Applied catalog in 2.85 seconds
source: Puppet
time: 2015-09-03 14:41:00.532436134 +02:00
resource_statuses:
Acl[/foobar]: !ruby/object:Puppet::Resource::Status
title: "/foobar"
file: "/etc/puppetlabs/code/environments/production/modules/foobar/manifests/host.pp"
line: 126
resource: Acl[/foobar]
resource_type: Acl
containment_path:
- Stage[main]
- Foobar::Host
- Acl[/foobar]
evaluation_time: 0.026457309
tags: !ruby/object:Puppet::Util::TagSet
hash:
acl: true
class: true
fobar::host: true
foobar: true
host: true
node: true
default: true
time: '2015-09-03T14:40:58.365835760+02:00'
failed: false
changed: true
out_of_sync: true
skipped: false
change_count: 1
out_of_sync_count: 1
events:
- !ruby/object:Puppet::Transaction::Event
audited: false
property: permission
previous_value:
- !ruby/string:Puppet::Util::Execution::ProcessOutput group::rwx
- !ruby/string:Puppet::Util::Execution::ProcessOutput mask::rwx
- !ruby/string:Puppet::Util::Execution::ProcessOutput other::---
- !ruby/string:Puppet::Util::Execution::ProcessOutput user::rwx
- !ruby/string:Puppet::Util::Execution::ProcessOutput user:mysql:rwx
desired_value:
- user:mysql:rwx
- default:user:mysql:rw-
- mask::rwx
historical_value:
message: permission changed 'group::rwx,mask::rwx,other::---,user::rwx,user:mysql:rwx'
to 'user:mysql:rwx,default:user:mysql:rw-,mask::rwx'
name: :permission_changed
status: success
time: 2015-09-03 14:40:58.379951548 +02:00
host: foo.inuits.eu
time: 2015-09-03 14:40:44.298996701 +02:00
kind: apply
report_format: 4
puppet_version: 4.2.1
configuration_version: Development version (Thu Sep 3 14:40:49 CEST 2015)
transaction_uuid: 6ae3832f-dc0e-4de8-817d-aa2d11395ec6
environment: production
status: changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment