Sha256: 470035076560d5e7fd8cb2a55b2326c7f20f785d9139162c63c0a2f9837cb357

Contents?: true

Size: 1.57 KB

Versions: 12

Compression:

Stored size: 1.57 KB

Contents

#
# Author:: AJ Christensen (<aj@chef.io>)
# Copyright:: Copyright 2008-2016, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# 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 "chef/resource/package"
require "chef/provider/package/yum"

class Chef
  class Resource
    class YumPackage < Chef::Resource::Package
      resource_name :yum_package
      provides :package, os: "linux", platform_family: %w{rhel fedora}

      # Install a specific arch
      property :arch, [ String, Array ]
      # the {} on the proc here is because rspec chokes if it's do...end
      property :flush_cache,
               Hash,
               default: { before: false, after: false },
               coerce: proc { |v|
                 if v.is_a?(Array)
                   v.each_with_object({}) { |arg, obj| obj[arg] = true }
                 elsif v.any?
                   v
                 else
                   { before: v, after: v }
                 end
               }
      property :allow_downgrade, [ true, false ], default: false
      property :yum_binary, String

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chef-12.17.44-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.17.44 lib/chef/resource/yum_package.rb
chef-12.16.42 lib/chef/resource/yum_package.rb
chef-12.16.42-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.15.19 lib/chef/resource/yum_package.rb
chef-12.15.19-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.14.89-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.14.89 lib/chef/resource/yum_package.rb
chef-12.14.77-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.14.77 lib/chef/resource/yum_package.rb
chef-12.14.60-universal-mingw32 lib/chef/resource/yum_package.rb
chef-12.14.60 lib/chef/resource/yum_package.rb