-
-
Save coderforhire/5536497 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
debug: Puppet::Type::Xpack::ProviderYum: Executing '/bin/rpm -q Co-TickerPlant-Core' | |
info: 3.1.9-49562.10263.4.x86_64 | |
info: Leaving Version | |
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:277:in `send' | |
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:277:in `retrieve' | |
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:720:in `retrieve' | |
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:715:in `each' | |
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:715:in `retrieve' | |
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:728:in `retrieve_resource' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:32:in `perform_changes' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in `evaluate' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate' | |
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:493:in `thinmark' | |
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' | |
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:492:in `thinmark' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:386:in `traverse' | |
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate' | |
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply' | |
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:122:in `retrieve_and_apply_catalog' | |
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark' | |
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' | |
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark' | |
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in `retrieve_and_apply_catalog' | |
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' | |
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:95:in `with_client' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:339:in `onetime' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:313:in `run_command' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail' | |
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' | |
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' | |
/usr/bin/puppet:4 | |
err: /Stage[main]/CO::Xrole::Core/Xpack[core]: Could not evaluate: undefined method `package_list' for #<Puppet::Type::Xpack::ProviderYum:0x7ffb6d7883c0> | |
debug: Class[CO]: The container Stage[main] will propagate my refresh event | |
debug: Finishing transaction 70358925947640 | |
debug: Storing state | |
debug: Stored state in 0.09 seconds | |
notice: Finished catalog run in 26.56 seconds | |
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, using default (yaml) | |
debug: report supports formats: b64_zlib_yaml raw yaml; using yaml |
This file contains hidden or 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
require 'puppet/util/package' | |
Puppet::Type.type(:xpack).provide(:yum) do | |
desc "Installation of CO specific packages." | |
has_feature :versionable, :installable | |
commands :yum => "yum", :rpm => "rpm", :python => "python" | |
def exists? | |
Puppet.info("#{resource[:package_list]}-- EXISTS?") | |
begin | |
rpm('-q', resource[:package_list]) | |
true | |
rescue Puppet::ExecutionFailure => e | |
false | |
end | |
end | |
def version | |
Puppet.info("Entering Version") | |
package = resource[:package_list].first | |
package = package.to_s | |
Puppet.info("#{package}") | |
version = rpm('-q', package) | |
if version =~ /^#{Regexp.escape(package)}-(.*)/ | |
Puppet.info("#{$1}") | |
$1 | |
end | |
Puppet.info("Leaving Version") | |
end | |
def version=(value) | |
Puppet.info("Entering Version=value") | |
yum('install', '-y', "TEST PACKAGE") | |
end | |
def create | |
Puppet.info("Entering Create") | |
resource[:package_list].each do |package| | |
Puppet.info("#{package}") | |
Puppet.info("#{resource[:version]}") | |
@packages = Array.new | |
@package_with_version = String.new | |
@package_with_version = "#{package}-#{resource[:version]}" | |
Puppet.info("#{@package_with_version}") | |
@packages << @package_with_version | |
end | |
Puppet.info("Out of loop installing #{@packages}") | |
yum('install', '-y', @packages) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment