Skip to content

Instantly share code, notes, and snippets.

@groob
Last active December 26, 2015 03:29
Show Gist options
  • Save groob/7086182 to your computer and use it in GitHub Desktop.
Save groob/7086182 to your computer and use it in GitHub Desktop.
vvrantchan@C02LH12CFFT3 ~/hub/puppetrepo/modules/truth/lib/puppet/parser/functions (has_app●●)$ sudo /usr/bin/puppet apply -v --modulepath=~/hub/puppetrepo/modules ~/hub/puppetrepo/manifests/site.pp --verbose --trace
Password:
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/availablespace.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/consoleuser.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_battery_charge_percent.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_battery_charging.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_battery_cycles.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_battery_health.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_current_user.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_encryption_enabled.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_flash_version.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_has_wireless.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_java_vendor.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_java_version.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_laptop.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_memory_in_gb.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_server_tags.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/mac_timezone.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/nosslsearch_ip_address.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/printers.rb
Info: Loading facts in /var/git/puppetrepo/modules/custom_facts/files/profiles.rb
Notice: Scope(Class[Truth::Enforcer]): I'm a Mac OS X 10.9 machine
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Scope(Class[Truth::Enforcer]): I'm a mac_laptop
Error: Could not autoload puppet/parser/functions/write_line_to_file: wrong number of arguments (1 for 0)
/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.2.3/lib/rbCFPropertyList.rb:91:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.2.3/lib/rbCFPropertyList.rb:91:in `new'
/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.2.3/lib/rbCFPropertyList.rb:91:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.2.3/lib/cfpropertylist.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
/Users/vvrantchan/hub/puppetrepo/modules/truth/lib/puppet/parser/functions/write_line_to_file.rb:1:in `<top (required)>'
/Library/Ruby/Site/puppet/util/autoload.rb:61:in `load'
/Library/Ruby/Site/puppet/util/autoload.rb:61:in `load_file'
/Library/Ruby/Site/puppet/util/autoload.rb:200:in `load'
/Library/Ruby/Site/puppet/parser/functions.rb:171:in `function'
/Library/Ruby/Site/puppet/parser/ast/function.rb:13:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/ifstatement.rb:25:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:121:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:180:in `block in evaluate_classes'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `each'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `evaluate_classes'
/Library/Ruby/Site/puppet/parser/functions/include.rb:11:in `block in <top (required)>'
/Library/Ruby/Site/puppet/parser/functions.rb:144:in `block (2 levels) in newfunction'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/functions.rb:137:in `block in newfunction'
/Library/Ruby/Site/puppet/parser/ast/function.rb:42:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:116:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:275:in `evaluate_ast_node'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `block in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `compile'
/Library/Ruby/Site/puppet/parser/compiler.rb:24:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:88:in `block (2 levels) in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:86:in `block in compile'
/Library/Ruby/Site/puppet/util.rb:162:in `block in benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:161:in `benchmark'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:85:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:45:in `find'
/Library/Ruby/Site/puppet/indirector/indirection.rb:197:in `find'
/Library/Ruby/Site/puppet/application/apply.rb:204:in `main'
/Library/Ruby/Site/puppet/application/apply.rb:146:in `run_command'
/Library/Ruby/Site/puppet/application.rb:364:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/application.rb:470:in `plugin_hook'
/Library/Ruby/Site/puppet/application.rb:364:in `block in run'
/Library/Ruby/Site/puppet/util.rb:485:in `exit_on_fail'
/Library/Ruby/Site/puppet/application.rb:364:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:132:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `<main>'
Error: Could not autoload puppet/parser/functions/write_line_to_file: wrong number of arguments (1 for 0) on node c02lh12cfft3.whitbyschool.net
/Library/Ruby/Site/puppet/util/autoload.rb:68:in `rescue in load_file'
/Library/Ruby/Site/puppet/util/autoload.rb:59:in `load_file'
/Library/Ruby/Site/puppet/util/autoload.rb:200:in `load'
/Library/Ruby/Site/puppet/parser/functions.rb:171:in `function'
/Library/Ruby/Site/puppet/parser/ast/function.rb:13:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/ifstatement.rb:25:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:121:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:180:in `block in evaluate_classes'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `each'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `evaluate_classes'
/Library/Ruby/Site/puppet/parser/functions/include.rb:11:in `block in <top (required)>'
/Library/Ruby/Site/puppet/parser/functions.rb:144:in `block (2 levels) in newfunction'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/functions.rb:137:in `block in newfunction'
/Library/Ruby/Site/puppet/parser/ast/function.rb:42:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:116:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:275:in `evaluate_ast_node'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `block in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `compile'
/Library/Ruby/Site/puppet/parser/compiler.rb:24:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:88:in `block (2 levels) in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:86:in `block in compile'
/Library/Ruby/Site/puppet/util.rb:162:in `block in benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:161:in `benchmark'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:85:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:45:in `find'
/Library/Ruby/Site/puppet/indirector/indirection.rb:197:in `find'
/Library/Ruby/Site/puppet/application/apply.rb:204:in `main'
/Library/Ruby/Site/puppet/application/apply.rb:146:in `run_command'
/Library/Ruby/Site/puppet/application.rb:364:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/application.rb:470:in `plugin_hook'
/Library/Ruby/Site/puppet/application.rb:364:in `block in run'
/Library/Ruby/Site/puppet/util.rb:485:in `exit_on_fail'
/Library/Ruby/Site/puppet/application.rb:364:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:132:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `<main>'
Error: Could not autoload puppet/parser/functions/write_line_to_file: wrong number of arguments (1 for 0) on node c02lh12cfft3.whitbyschool.net
/Library/Ruby/Site/puppet/util/autoload.rb:68:in `rescue in load_file'
/Library/Ruby/Site/puppet/util/autoload.rb:59:in `load_file'
/Library/Ruby/Site/puppet/util/autoload.rb:200:in `load'
/Library/Ruby/Site/puppet/parser/functions.rb:171:in `function'
/Library/Ruby/Site/puppet/parser/ast/function.rb:13:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/ifstatement.rb:25:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:121:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:180:in `block in evaluate_classes'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `each'
/Library/Ruby/Site/puppet/parser/compiler.rb:165:in `evaluate_classes'
/Library/Ruby/Site/puppet/parser/functions/include.rb:11:in `block in <top (required)>'
/Library/Ruby/Site/puppet/parser/functions.rb:144:in `block (2 levels) in newfunction'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/functions.rb:137:in `block in newfunction'
/Library/Ruby/Site/puppet/parser/ast/function.rb:42:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:15:in `block in evaluate'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `each'
/Library/Ruby/Site/puppet/parser/ast/block_expression.rb:10:in `evaluate'
/Library/Ruby/Site/puppet/parser/ast.rb:62:in `safeevaluate'
/Library/Ruby/Site/puppet/resource/type.rb:116:in `evaluate_code'
/Library/Ruby/Site/puppet/parser/resource.rb:81:in `evaluate'
/Library/Ruby/Site/puppet/parser/compiler.rb:275:in `evaluate_ast_node'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `block in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/parser/compiler.rb:113:in `compile'
/Library/Ruby/Site/puppet/parser/compiler.rb:24:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:88:in `block (2 levels) in compile'
/Library/Ruby/Site/puppet/util/profiler/none.rb:6:in `profile'
/Library/Ruby/Site/puppet/util/profiler.rb:31:in `profile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:86:in `block in compile'
/Library/Ruby/Site/puppet/util.rb:162:in `block in benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:161:in `benchmark'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:85:in `compile'
/Library/Ruby/Site/puppet/indirector/catalog/compiler.rb:45:in `find'
/Library/Ruby/Site/puppet/indirector/indirection.rb:197:in `find'
/Library/Ruby/Site/puppet/application/apply.rb:204:in `main'
/Library/Ruby/Site/puppet/application/apply.rb:146:in `run_command'
/Library/Ruby/Site/puppet/application.rb:364:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/application.rb:470:in `plugin_hook'
/Library/Ruby/Site/puppet/application.rb:364:in `block in run'
/Library/Ruby/Site/puppet/util.rb:485:in `exit_on_fail'
/Library/Ruby/Site/puppet/application.rb:364:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:132:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4:in `<main>'
vvrantchan@C02LH12CFFT3 ~/hub/puppetrepo/modules/truth/lib/puppet/parser/functions (has_app●●)$
require 'cfpropertylist'
module Puppet::Parser::Functions
newfunction(:write_line_to_file) do |args|
filename = args[0]
str = args[1]
File.open(filename, 'a') {|fd| fd.puts str }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment