Skip to content

Instantly share code, notes, and snippets.

@jeekl
Created April 24, 2013 15:18
Show Gist options
  • Save jeekl/5452933 to your computer and use it in GitHub Desktop.
Save jeekl/5452933 to your computer and use it in GitHub Desktop.
# yum list --showduplicates nodejs
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Available Packages
nodejs.x86_64 0.10.1-1.el6 thirdparty
nodejs.x86_64 0.10.2-1.el6 thirdparty
nodejs.x86_64 0.10.3-1.el6 thirdparty
# shef -z
chef > recipe
chef:recipe > yum_package "nodejs" do
chef:recipe > version "0.10.1-1.el6"
chef:recipe ?> end
=> <yum_package[nodejs] @cookbook_name: nil @not_if_args: {} @name: "nodejs" @updated_by_last_action: false @response_file: nil @immediate_notifications: [] @params: {} @candidate_version: nil @not_if: nil @allowed_actions: [:nothing, :install, :upgrade, :remove, :purge] @options: nil @resource_name: :yum_package @source_line: "(irb#1):1:in `irb_binding'" @updated: false @enclosing_provider: nil @package_name: "nodejs" @only_if_args: {} @before: nil @ignore_failure: false @action: :install @recipe_name: nil @version: "0.10.1-1.el6" @only_if: nil @noop: nil @supports: {} @source: nil @delayed_notifications: [] @provider: Chef::Provider::Package::Yum>
chef:recipe > run_chef
[Wed, 24 Apr 2013 15:07:19 +0000] INFO: Processing yum_package[nodejs] action install ((irb#1) line 1)
[Wed, 24 Apr 2013 15:07:23 +0000] DEBUG: yum_package[nodejs] checking yum info for nodejs
[Wed, 24 Apr 2013 15:07:23 +0000] DEBUG: yum_package[nodejs] installed version: candidate version: 0.10.3-1.el6
[Wed, 24 Apr 2013 15:07:23 +0000] DEBUG: trying to match 0.10.1-1.el6 to version 0.10.3 and release 1.el6
[Wed, 24 Apr 2013 15:07:23 +0000] ERROR: yum_package[nodejs] ((irb#1) line 1) has had an error
ArgumentError: yum_package[nodejs] ((irb#1) line 1) had an error: nodejs: Version 0.10.1-1.el6 of nodejs not found. Did you specify both version and release? (version-release, e.g. 1.84-10.fc6)
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/provider/package/yum.rb:221:in `install_package'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/provider/package.rb:60:in `action_install'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource.rb:417:in `send'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource.rb:417:in `run_action'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/runner.rb:45:in `run_action'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/runner.rb:78:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/runner.rb:78:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/runner.rb:78:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection.rb:94:in `execute_each_resource'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/resource_collection.rb:92:in `execute_each_resource'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/runner.rb:76:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/shef/ext.rb:234:in `run_chef'
from (irb#1):4chef:recipe >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment