Forge Home

yum

YUM utilities

65,568,467 downloads

11,534 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 7.1.0 (latest)
  • 7.0.0
  • 6.2.0
  • 6.1.0
  • 6.0.0
  • 5.6.1
  • 5.6.0
  • 5.5.0
  • 5.4.0
  • 5.3.1
  • 5.3.0
  • 5.2.0
  • 5.1.0
  • 5.0.0
  • 4.3.0
  • 4.2.0
  • 4.1.1
  • 4.1.0
  • 4.0.0
  • 3.1.1
  • 3.1.0
  • 3.0.0
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.0.0
  • 0.10.0
  • 0.9.15
  • 0.9.14
released Sep 26th 2016
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0 < 5.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-yum', '0.9.15'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-yum
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-yum --version 0.9.15

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/yum — version 0.9.15 Sep 26th 2016

Puppet yum module

This module provides helpful definitions for dealing with yum.

Requirements

Module has been tested on:

  • Puppet 3.x
  • CentOS 6, 7

Usage

yum

Manage main Yum configuration.

class { 'yum':
  keepcache         => false|true,
  debuglevel        => number,
  exactarch         => false|true,
  obsoletes         => false|true,
  gpgcheck          => false|true,
  installonly_limit => number,
  keep_kernel_devel => false|true,
}

If installonly_limit is changed, purging of old kernel packages is triggered.

yum::config

Manage yum.conf.

yum::config { 'installonly_limit':
  ensure => 2,
}

yum::config { 'debuglevel':
  ensure => absent,
}

yum::gpgkey

Import/remove GPG RPM signing key.

Key defined in recipe (inline):

yum::gpgkey { '/etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-smoketest1':
  ensure  => present,
  content => '-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----',
}

Key stored on Puppet fileserver:

yum::gpgkey { '/etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org':
  ensure => present,
  source => 'puppet:///modules/elrepo/RPM-GPG-KEY-elrepo.org',
}

yum::plugin

Install or remove yum plugin:

yum::plugin { 'versionlock':
  ensure => present,
}

yum::versionlock

Locks explicitly specified packages from updates. Package name must be precisely specified in format EPOCH:NAME-VERSION-RELEASE.ARCH. Wild card in package name is allowed or automatically appended, but be careful and always first check on target machine if your package is matched correctly! Following definitions create same configuration lines:

yum::versionlock { '0:bash-4.1.2-9.el6_2.*':
  ensure => present,
}

yum::versionlock { '0:bash-4.1.2-9.el6_2.':
  ensure => present,
}

Correct name for installed package can be easily get by running e.g.:

$ rpm -q bash --qf '%|EPOCH?{%{EPOCH}}:{0}|:%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n'
0:bash-4.2.45-5.el7_0.4.x86_64

yum::group

Install or remove yum package group:

yum::group { 'X Window System':
  ensure  => present,
  timeout => 600,
}

yum::install

Install or remove packages via yum install subcommand:

From URL:

yum::install { 'package-name':
  ensure => present,
  source => 'http://path/to/package/filename.rpm',
}

From local filesystem:

yum::install { 'package-name':
  ensure => present,
  source => '/path/to/package/filename.rpm',
}

Please note that resource name must be same as installed package name.

Contributors


CERIT Scientific Cloud, support@cerit-sc.cz