Sha256: c29a21d774321ef30f117cf34cf00872d8f2e1fbe56ef1cf51b195dd98c68d83

Contents?: true

Size: 1.45 KB

Versions: 34

Compression:

Stored size: 1.45 KB

Contents

Puppet::Type.type(:package).provide :dnf, :parent => :yum do
  desc "Support via `dnf`.

  Using this provider's `uninstallable` feature will not remove dependent packages. To
  remove dependent packages with this provider use the `purgeable` feature, but note this
  feature is destructive and should be used with the utmost care.

  This provider supports the `install_options` attribute, which allows command-line flags to be passed to dnf.
  These options should be specified as a string (e.g. '--flag'), a hash (e.g. {'--flag' => 'value'}),
  or an array where each element is either a string or a hash."

  has_feature :install_options, :versionable, :virtual_packages

  commands :cmd => "dnf", :rpm => "rpm"

  # Note: this confine was borrowed from the Yum provider. The
  # original purpose (from way back in 2007) was to make sure we
  # never try to use RPM on a machine without it. We think this
  # has probably become obsolete with the way `commands` work, so
  # we should investigate removing it at some point.
  if command('rpm')
    confine :true => begin
      rpm('--version')
      rescue Puppet::ExecutionFailure
        false
      else
        true
      end
  end

  defaultfor :operatingsystem => :fedora, :operatingsystemmajrelease => ['22', '23']

  # The value to pass to DNF as its error output level.
  # DNF differs from Yum slightly with regards to error outputting.
  #
  # @param None
  # @return [String]
  def self.error_level
    '1'
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
puppet-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.3.1 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.3.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.2.1 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.2.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.1.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-retrospec-1.0.0 vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb
puppet-4.5.2 lib/puppet/provider/package/dnf.rb
puppet-4.5.2-x86-mingw32 lib/puppet/provider/package/dnf.rb
puppet-4.5.2-x64-mingw32 lib/puppet/provider/package/dnf.rb
puppet-4.5.2-universal-darwin lib/puppet/provider/package/dnf.rb
puppet-4.5.1 lib/puppet/provider/package/dnf.rb
puppet-4.5.1-x86-mingw32 lib/puppet/provider/package/dnf.rb
puppet-4.5.1-x64-mingw32 lib/puppet/provider/package/dnf.rb
puppet-4.5.1-universal-darwin lib/puppet/provider/package/dnf.rb
puppet-4.5.0 lib/puppet/provider/package/dnf.rb
puppet-4.5.0-x86-mingw32 lib/puppet/provider/package/dnf.rb