Version information
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
Add this module to your Puppetfile:
mod 'puppet-yum', '0.9.15'
Learn more about managing modules with a PuppetfileDocumentation
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
- Joseph Yaworski jyaworski@carotid.us
- Eugene Dementiev eugene@dementiev.eu
- Mark McKinstry mmckinst@nexcess.net
- Trey Dockendorf treydock@gmail.com
- Derek McEachern a0216331@ti.com
- John Zimmerman zimmermj@trimet.org
CERIT Scientific Cloud, support@cerit-sc.cz
2016-09-26 - Release 0.9.15
- Remove invalid dependency from metadata
- Manage yum::versionlock with concat
- Puppet no longer creates empty files when using Hiera and create_resources() to create Yum keys
2016-08-15 - Release 0.9.14
- Release to Forge again
- Fix module metadata
2016-08-13 - Release 0.9.13
- Release to Forge
2016-06-25 - Release 0.9.12
- Move to VoxPupuli org
- Add base modulesync configs
2016-05-30 - Release 0.9.8
- YUM group commands can set exec. timeout and respect hidden groups.
- Fix yum plugins on RHEL 5.x.
- At least puppetlabs/stdlib 4.2.0 is required.
- New resource yum::install for installing of local/remote packages.
Features
- Tunable exec. timeout for YUM group management commands.
- New defined resource yum::install for local or remote (URL) packages install.
Bugfixes
- Properly detect YUM plugins prefixes on RHEL 5.x
- Increased requirements on puppetlabs/stdlib to 4.2.0
- Yum group management respects hidden groups
2015-05-29 - Release 0.9.6
Fixed check for installed YUM group on RHEL 7.
Bugfixes
- Fixed check for installed YUM group on RHEL/CentOS 7
2015-04-07 - Release 0.9.5
New class yum, defined resource yum::config. Trigger old kernels purge.
Features
- New defined resource yum::config to allow changes in /etc/yum.conf.
- New class yum to set common global parameters
- If installonly_limit is changed, old kernels above the limit are purged.
2014-12-08 - Release 0.9.4
Fix file/directory permissions.
Bugfixes
- Fix PF module archive file/directory permissions.
2014-11-06 - Release 0.9.3
Enable yum.conf plugins if disabled.
Bugfixes
- Enable yum.conf plugins (if disabled) when we install plugin via yum::plugin.
2014-09-02 - Release 0.9.2
Fix metadata.json
Bugfixes
- Fix metadata.json module dependencies
2014-08-20 - Release 0.9.1
Summary
Fix GPG key import check when key is specified in $content.
Bugfixes
- Fix GPG key import check when key is specified in $content.
2014-08-07 - Release 0.9.0
Summary
Initial release.
Dependencies
- puppetlabs/stdlib (>= 4.2.0 < 5.0.0)
- puppetlabs/concat (>= 1.1.1)
The MIT License (MIT) Copyright (c) 2014-16 Institute of Computer Science, Masaryk University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.