Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.8 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'ghoneycutt-yum', '2.3.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-yum
Table of Contents
- Module Description
- Setup - The basics of getting started with yum
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Examples
- Development - Guide for contributing to the module
Module description
Manage yum (client, server, and key management). This module manages
/etc/yum.conf
and can manage a repo file such as
/etc/yum.repos.d/foo.repo
using yum::repo
. This functionality is
feature complete and supports all documented options. The module can
fetch and install RPM GPG keys to aid in the usage of GPG keys for
repositories.
This module has the ability to create a yum server to serve up yum repositories to agents using Apache.
Setup
What yum affects
See the description.
Beginning with yum
Declare the main ::yum
class. See profile examples below.
Usage
See examples below.
Minimum usage
include '::yum'
Parameters to configure classes and defined types.
Please consult the REFERENCE.md
file for all parameters or the
puppet-strings generated documentation at
http://ghoneycutt.github.io/puppet-module-yum/.
Limitations
This module is built for use with Puppet versions 5 and 6 on the
following platforms and supports the Ruby version associated with each
puppet agent release. See .travis.yml
for an exact matrix.
- EL 6
- EL 7
Development
See CONTRIBUTING.md
for information related to the development of this
module.
Examples
Create simple yum repo file
yum::repo { 'example_plain':
gpgkey => 'http://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_PLAIN',
baseurl => 'http://yum.test.local/customrepo/5/10/$basearch',
}
Using Hiera:
yum::repos:
example_plain:
gpgkey: 'http://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_PLAIN'
baseurl: 'http://yum.test.local/customrepo/5/10/$basearch'
Create secured repository and import GPG key into local store:
yum::repo { 'example_secure':
gpgkey => 'https://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_SECURE',
baseurl => 'https://yum.test.local/customrepo/5/10/$basearch',
username => 'example',
password => 'secret',
gpgcheck => true,
}
yum::rpm_gpg_key { 'example_secure':
gpgkey => '/etc/pki/rpm-gpg/RPM-GPG-KEY-EXAMPLE_SECURE',
gpgkey_url => 'https://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_SECURE',
}
Using Hiera:
yum::repos:
example_secure:
gpgkey: 'https://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_SECURE'
baseurl 'https://yum.test.local/customrepo/5/10/$basearch'
username: 'example'
password: 'secret'
gpgcheck: true
yum::rpm_gpg_keys:
example_secure:
gpgkey: '/etc/pki/rpm-gpg/RPM-GPG-KEY-EXAMPLE_SECURE'
gpgkey_url: 'https://yum.test.local/keys/RPM-GPG-KEY-EXAMPLE_SECURE'
Profile for a yum server
include ::yum::server
Profile for all EL systems
include ::yum
Design patterns
Use Hiera to include the yum
class on all EL6 and EL7 systems.
Create a profile such as profile::yumrepos
that lists all your yum
repos as virtual resources and then realizing the repos in the
appropriate profiles.
# profile::yumrepos
@yum::repo { 'app_foo':
baseurl => 'http://yum.test.local/app_foo/7/$basearch',
}
@yum::repo { 'app_bar':
baseurl => 'http://yum.test.local/app_bar/7/$basearch',
}
# profile::foo
realize Yum::repo['app_foo']
Reference
Table of Contents
Classes
yum
: Manage yum (client, server, and key management)yum::server
: Manage a yum repository serviceyum::updatesd
: Manage yum-updatesd which is available on EL5, though not EL6 This is defaulted to being disabled.
Defined types
yum::repo
: Manage individual yum repo files in /etc/yum.repos.d This was usedyum::rpm_gpg_key
: Downloads a public gpg key for a yum repo and installs the key Uses wget and rpimport commands
Classes
yum
Manage yum (client, server, and key management)
Examples
Declaring the class
include ::yum
Parameters
The following parameters are available in the yum
class.
config_path
Data type: Stdlib::Absolutepath
Set the path to the yum.conf file, representing a fully qualified name.
Default value: '/etc/yum.conf'
config_owner
Data type: String
Set owner access to the yum.conf file, representing a user.
Default value: 'root'
config_group
Data type: String
Set group access to the yum.conf file, representing a group.
Default value: 'root'
config_mode
Data type: Stdlib::Filemode
Set access permissions for the yum.conf file, in numeric notation.
Default value: '0644'
manage_repos
Data type: Boolean
Trigger if files in /etc/yum.repos.d should get managed by Puppet exclusivly. If set to true, all unmanged files in /etc/yum.repos.d (and below) will get removed.
Default value: false
repos_d_owner
Data type: String
Set owner access to the /etc/yum.repos.d directory, representing a user.
Default value: 'root'
repos_d_group
Data type: String
Set group access to the /etc/yum.repos.d directory, representing a group.
Default value: 'root'
repos_d_mode
Data type: Stdlib::Filemode
Set access permissions for the /etc/yum.repos.d directory, in numeric notation.
Default value: '0755'
repos_hiera_merge
Data type: Boolean
Trigger to merge all found instances of yum::repos in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.
Default value: true
rpm_gpg_keys_hiera_merge
Data type: Boolean
Trigger to merge all found instances of yum::rpm_gpg_keys in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.
Default value: true
repos
Data type: Optional[Hash]
Hash of repos to pass to yum::repo. See yum::repo for more details.
Default value: undef
rpm_gpg_keys
Data type: Optional[Hash]
Hash of repos to pass to yum::rpm_gpg_keys. See yum::rpm_gpg_key for more details.
Default value: undef
exclude_hiera_merge
Data type: Boolean
Trigger to merge all found instances of yum::exclude in Hiera. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.
Default value: false
color_list_available_downgrade
Data type: Array
color_list_available_downgrade setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_available_install
Data type: Array
color_list_available_install setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_available_reinstall
Data type: Array
color_list_available_reinstall setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_available_upgrade
Data type: Array
color_list_available_upgrade setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_installed_extra
Data type: Array
color_list_installed_extra setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_installed_newer
Data type: Array
color_list_installed_newer setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_installed_older
Data type: Array
color_list_installed_older setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_list_installed_reinstall
Data type: Array
color_list_installed_reinstall setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_search_match
Data type: Array
color_search_match setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_update_installed
Data type: Array
color_update_installed setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_update_local
Data type: Array
color_update_local setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
color_update_remote
Data type: Array
color_update_remote setting in the main section of yum.conf. Valid values are: 'bg:black', 'bg:blue', 'bg:cyan', 'bg:green', 'bg:magenta', 'bg:red', 'bg:white', 'bg:yellow', 'blink', 'bold', 'dim', 'fg:black', 'fg:blue', 'fg:cyan', 'fg:green', 'fg:magenta', 'fg:red', 'fg:white', 'fg:yellow', 'reverse', 'underline', When empty, it will not be present in yum.conf.
Default value: []
commands
Data type: Array
commands setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
exclude
Data type: Array
exclude setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
group_package_types
Data type: Array
group_package_types setting in the main section of yum.conf. Valid values are: , 'default', 'mandatory', and 'optional'. When empty, it will not be present in yum.conf.
Default value: []
history_record_packages
Data type: Array
history_record_packages setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
installonlypkgs
Data type: Array
installonlypkgs setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
kernelpkgnames
Data type: Array
kernelpkgnames setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
protected_packages
Data type: Array
protected_packages setting in the main section of yum.conf. When empty, it will not be present in yum.conf.
Default value: []
tsflags
Data type: Array
tsflags setting in the main section of yum.conf. Valid values are: , 'justdb', 'nocontexts', 'nodocs', 'noscripts', 'notriggers', 'repackage', and 'test' When empty, it will not be present in yum.conf.
Default value: []
reposdir
Data type: Array[Stdlib::Absolutepath]
reposdir setting in the main section of yum.conf. Takes a list of one or more absolute paths. When empty, it will not be present in yum.conf.
Default value: []
distroverpkg
Data type: Optional[Variant[Boolean,String]]
distroverpkg setting in the main section of yum.conf. Will use the format distroverpk=$::operatingsystem-release (downcase) if true. Alternatively you can also specify a free string text instead. When undef, it will not be present in yum.conf.
Default value: undef
alwaysprompt
Data type: Optional[Boolean]
alwaysprompt setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
assumeyes
Data type: Optional[Boolean]
assumeyes setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
clean_requirements_on_remove
Data type: Optional[Boolean]
clean_requirements_on_remove setting in the main section of yum.conf. True enables, false disables this feature. When clean, it will not be present in yum.conf.
Default value: undef
color
Data type: Optional[Boolean]
color setting in the main section of yum.conf. True enables, false disables this feature. When clean, it will not be present in yum.conf.
Default value: undef
diskspacecheck
Data type: Optional[Boolean]
diskspacecheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
enable_group_conditionals
Data type: Optional[Boolean]
enable_group_conditionals setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
exactarch
Data type: Optional[Boolean]
exactarch setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: true
gpgcheck
Data type: Optional[Boolean]
gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: false
groupremove_leaf_only
Data type: Optional[Boolean]
groupremove_leaf_only setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
history_record
Data type: Optional[Boolean]
history_record setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
keepalive
Data type: Optional[Boolean]
keepalive setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
keepcache
Data type: Optional[Boolean]
keepcache setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: true
localpkg_gpgcheck
Data type: Optional[Boolean]
localpkg_gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
obsoletes
Data type: Optional[Boolean]
obsoletes setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: true
overwrite_groups
Data type: Optional[Boolean]
overwrite_groups setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
plugins
Data type: Optional[Boolean]
plugins setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: false
protected_multilib
Data type: Optional[Boolean]
protected_multilib setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
repo_gpgcheck
Data type: Optional[Boolean]
repo_gpgcheck setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
reset_nice
Data type: Optional[Boolean]
reset_nice setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
showdupesfromrepos
Data type: Optional[Boolean]
showdupesfromrepos setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
skip_broken
Data type: Optional[Boolean]
skip_broken setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
ssl_check_cert_permissions
Data type: Optional[Boolean]
ssl_check_cert_permissions setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
sslverify
Data type: Optional[Boolean]
sslverify setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: undef
tolerant
Data type: Optional[Boolean]
tolerant setting in the main section of yum.conf. True enables, false disables this feature. When undef, it will not be present in yum.conf.
Default value: false
debuglevel
Data type: Optional[Integer[0, 10]]
debuglevel setting in the main section of yum.conf. Takes any integer between 0 and 10. When undef, it will not be present in yum.conf.
Default value: 2
errorlevel
Data type: Optional[Integer[0, 10]]
errorlevel setting in the main section of yum.conf. Takes any integer between 0 and 10. When undef, it will not be present in yum.conf.
Default value: undef
bandwidth
Data type: Optional[Integer]
bandwidth setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
installonly_limit
Data type: Optional[Integer]
installonly_limit setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
mirrorlist_expire
Data type: Optional[Integer]
mirrorlist_expire setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
recent
Data type: Optional[Integer]
recent setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
retries
Data type: Optional[Integer]
retries setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
timeout
Data type: Optional[Integer]
timeout setting in the main section of yum.conf. Takes any integer. When undef, it will not be present in yum.conf.
Default value: undef
cachedir
Data type: Optional[Stdlib::Absolutepath]
cachedir setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: '/var/cache/yum/$basearch/$releasever'
installroot
Data type: Optional[Stdlib::Absolutepath]
installroot setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
logfile
Data type: Optional[Stdlib::Absolutepath]
logfile setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: '/var/log/yum.log'
persistdir
Data type: Optional[Stdlib::Absolutepath]
persistdir setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
pluginconfpath
Data type: Optional[Stdlib::Absolutepath]
pluginconfpath setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
pluginpath
Data type: Optional[Stdlib::Absolutepath]
pluginpath setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
sslcacert
Data type: Optional[Stdlib::Absolutepath]
sslcacert setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
sslclientcert
Data type: Optional[Stdlib::Absolutepath]
sslclientcert setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
sslclientkey
Data type: Optional[Stdlib::Absolutepath]
sslclientkey setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
bugtracker_url
Data type: Optional[Stdlib::Httpurl]
bugtracker_url setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
proxy
Data type: Optional[Stdlib::Httpurl]
proxy setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
password
Data type: Optional[String]
password setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
proxy_password
Data type: Optional[String]
proxy_password setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
proxy_username
Data type: Optional[String]
proxy_username setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
syslog_device
Data type: Optional[String]
syslog_device setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
syslog_facility
Data type: Optional[String]
syslog_facility setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
syslog_ident
Data type: Optional[String]
syslog_ident setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
username
Data type: Optional[String]
username setting in the main section of yum.conf. When undef, it will not be present in yum.conf.
Default value: undef
throttle
Data type: Optional[Variant[Integer,Float,Pattern[/^\d+(.\d+|)(k|M|G)*$/]]]
throttle setting in the main section of yum.conf. Rate in bytes/sec, allows a suffix of k, M, or G to be appended. When undef, it will not be present in yum.conf.
Default value: undef
metadata_expire
Data type: Optional[Variant[Integer,Pattern[/^(\d+(m|h|d)*|never|)$/]]]
metadata_expire setting in the main section of yum.conf. Time in seconds, allows a suffix of m, h, or d to specify minutes, hours, or days. Alternatively you can also specify the word never instead. When undef, it will not be present in yum.conf.
Default value: '6h'
history_list_view
Data type: Optional[Enum['cmds','commands','default','single-user-commands','users']]
history_list_view setting in the main section of yum.conf. Valid values are: 'cmds', 'commands', 'default', 'single-user-commands', or 'users'. When undef, it will not be present in yum.conf.
Default value: undef
mdpolicy
Data type: Optional[Enum['group:all','group:main','group:primary','group:small','instant']]
mdpolicy setting in the main section of yum.conf. Valid values are: 'group:all', 'group:main', 'group:primary', 'group:small', or 'instant'. When undef, it will not be present in yum.conf.
Default value: undef
rpmverbosity
Data type: Optional[Enum['critical','debug','emergency','error','info','warn']]
rpmverbosity setting in the main section of yum.conf. Valid values are: 'critical', 'debug', 'emergency', 'error', 'info', or 'warn'. When undef, it will not be present in yum.conf.
Default value: undef
http_caching
Data type: Optional[Enum['all','none','packages']]
http_caching setting in the main section of yum.conf. Valid values are: 'all', 'none', or 'packages'. When undef, it will not be present in yum.conf.
Default value: undef
multilib_policy
Data type: Optional[Enum['all','best']]
multilib_policy setting in the main section of yum.conf. Valid values are: 'all' or 'best'. When undef, it will not be present in yum.conf.
Default value: undef
pkgpolicy
Data type: Optional[Enum['last', 'newest']]
pkgpolicy setting in the main section of yum.conf. Valid values are: 'last' or 'newest'. When undef, it will not be present in yum.conf.
Default value: undef
yum::server
Manage a yum repository service
Parameters
The following parameters are available in the yum::server
class.
contact_email
Data type: String
Set email address for server administration contact. Will be used for ServerAdmin in Apache vhost configuration.
Default value: 'root@localhost'
docroot
Data type: Stdlib::Absolutepath
Set absolute path to document root. Will be used for DocumentRoot Apache vhost configuration.
Default value: '/opt/repos'
gpg_keys_path
Data type: String
Set relative path to GPG keys directory which will be in $docroot directory. $docroot/$gpg_keys_path will be created and used.
Default value: 'keys'
gpg_user_name
Data type: String
Set user who signs the packages. Will be used as %_gpg_name in /root/.rpmmacros.
Default value: 'Root'
servername
Data type: String
Set servername for yum repository. Will be used for ServerName in Apache vhost configuration.
Default value: 'yum'
serveraliases
Data type: Array[String, 1]
Set serveraliases for yum repository. Will be used for ServerAlias Apache vhost configuration.
Default value: [ $::fqdn, $::hostname ]
http_listen_ip
Data type: Stdlib::IP::Address::Nosubnet
Set listen IP for yum repository server. Will be used for VirtualHost in Apache vhost configuration.
Default value: $::ipaddress
yum::updatesd
Manage yum-updatesd which is available on EL5, though not EL6 This is defaulted to being disabled.
Parameters
The following parameters are available in the yum::updatesd
class.
updatesd_package
Data type: String
Specify name of yum updatesd package.
Default value: 'yum-updatesd'
updatesd_package_ensure
Data type: String
Set ensure attribute for package resource. Valid values are: 'present', 'absent', 'latest', and 'purged'.
Default value: 'absent'
updatesd_service
Data type: String
Specify name of yum updatesd service.
Default value: 'yum-updatesd'
updatesd_service_ensure
Data type: Stdlib::Ensure::Service
Set ensure attribute for service resource. Valid values are: 'running' and 'stopped'.
Default value: 'stopped'
updatesd_service_enable
Data type: Variant[String,Boolean]
Set enable attribute for service resource. Valid values are: 'true', 'false', 'manual', and 'mark'.
Default value: false
Defined types
yum::repo
in favor of the yumrepo type, which cannot manage files in that directory.
Examples
Using the define.
yum::repo { 'redhat-base':
gpgcheck => true,
}
Parameters
The following parameters are available in the yum::repo
defined type.
ensure
Data type: Enum['absent', 'present']
Set to "present" or "absent". When absent, removes the repository configuration file from the node modeled on the behavior of the File type's ensure parameter.
Default value: 'present'
repo_file_mode
Data type: Stdlib::Filemode
Set the file mode of the repository configuration file.
Default value: '0400'
yum_repos_d_path
Data type: Stdlib::Absolutepath
Specify the path of the directory for yum repository files.
Default value: '/etc/yum.repos.d'
enabled
Data type: Optional[Boolean]
enabled setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: true
enablegroups
Data type: Optional[Boolean]
enablegroups setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
gpgcheck
Data type: Optional[Boolean]
gpgcheck setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: false
keepalive
Data type: Optional[Boolean]
keepalive setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
repo_gpgcheck
Data type: Optional[Boolean]
repo_gpgcheck setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
skip_if_unavailable
Data type: Optional[Boolean]
skip_if_unavailable setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
ssl_check_cert_permissions
Data type: Optional[Boolean]
ssl_check_cert_permissions setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
sslverify
Data type: Optional[Boolean]
sslverify setting in the repository file. True enables, false disables this feature. When undef, it will not be present.
Default value: undef
bandwidth
Data type: Optional[Integer]
bandwidth setting in the repository file. Takes any integer. When undef, it will not be present.
Default value: undef
cost
Data type: Optional[Integer]
cost setting in the repository file. Takes any integer. When undef, it will not be present.
Default value: undef
mirrorlist_expire
Data type: Optional[Integer]
mirrorlist_expire setting in the repository file. Takes any integer. When undef, it will not be present.
Default value: undef
retries
Data type: Optional[Integer]
retries setting in the repository file. Takes any integer. When undef, it will not be present.
Default value: undef
timeout
Data type: Optional[Integer]
timeout settingg in the repository file. Takes any integer. When undef, it will not be present.
Default value: undef
description
Data type: Optional[String]
name setting in the repository file. Defaults to the name of the defined type. When undef, it will not be present.
Default value: $name
password
Data type: Optional[String]
password setting in the repository file. When undef, it will not be present.
Default value: undef
proxy_password
Data type: Optional[String]
proxy_password setting in the repository file. When undef, it will not be present.
Default value: undef
proxy_username
Data type: Optional[String]
proxy_username setting in the repository file. When undef, it will not be present.
Default value: undef
repositoryid
Data type: Optional[String]
repositoryid setting in the repository file. When undef, it will not be present.
Default value: undef
username
Data type: Optional[String]
username setting in the repository file. When undef, it will not be present.
Default value: undef
baseurl
Data type: Array[Variant[Stdlib::Httpurl,Pattern[/^(file|ftp):\/\//]]]
baseurl setting in the repository file. Accepts HTTP/HTTPS/FTP/FILE URLs. When undef, it will not be present.
Default value: []
gpgcakey
Data type: Optional[Stdlib::Httpurl]
gpgcakey setting in the repository file. Accepts HTTP/HTTPS URLs. When undef, it will not be present.
Default value: undef
gpgkey
Data type: Array[Variant[Stdlib::Httpurl,Pattern[/^(file|ftp):\/\//]]]
gpgkey setting in the repository file. Accepts HTTP/HTTPS/FTP/FILE URLs. When undef, it will not be present.
Default value: []
metalink
Data type: Optional[Stdlib::Httpurl]
metalink setting in the repository file. Accepts HTTP/HTTPS URLs. When undef, it will not be present.
Default value: undef
mirrorlist
Data type: Optional[Stdlib::Httpurl]
mirrorlist setting in the repository file. Accepts HTTP/HTTPS URLs. When undef, it will not be present.
Default value: undef
proxy
Data type: Optional[Variant[Stdlib::Httpurl,Enum['_none_']]]
proxy setting in the repository file. Accepts HTTP/HTTPS URLs and 'none'. When undef, it will not be present.
Default value: undef
failovermethod
Data type: Optional[Enum['priority','roundrobin']]
failovermethod setting in the repository file. Valid values are: 'priority' or 'roundrobin'. When undef, it will not be present in yum.conf.
Default value: undef
http_caching
Data type: Optional[Enum['all','none','packages']]
http_caching setting in the repository file. Valid values are: 'all', 'none', or 'packages'. When undef, it will not be present in yum.conf.
Default value: undef
throttle
Data type: Optional[Variant[Integer,Float,Pattern[/^\d+(.\d+|)(k|M|G)*$/]]]
throttle setting in the repository file. Rate in bytes/sec, allows a suffix of k, M, or G to be appended. When undef, it will not be present.
Default value: undef
metadata_expire
Data type: Optional[Variant[Integer,Pattern[/^(\d+(m|h|d)*|never|)$/]]]
metadata_expire setting in the repository file. Time in seconds, allows a suffix of m, h, or d to specify minutes, hours, or days. Alternatively you can also specify the word never instead. When undef, it will not be present.
Default value: undef
sslcacert
Data type: Optional[Stdlib::Absolutepath]
sslcacert setting in the repository file. When undef, it will not be present.
Default value: undef
sslclientcert
Data type: Optional[Stdlib::Absolutepath]
sslclientcert setting in the repository file. When undef, it will not be present.
Default value: undef
sslclientkey
Data type: Optional[Stdlib::Absolutepath]
sslclientkey setting in the repository file. When undef, it will not be present.
Default value: undef
exclude
Data type: Array
exclude setting in the repository file. When empty, it will not be present.
Default value: []
includepkgs
Data type: Array
includepkgs setting in the repository file. When empty, it will not be present.
Default value: []
yum::rpm_gpg_key
Downloads a public gpg key for a yum repo and installs the key Uses wget and rpimport commands
Parameters
The following parameters are available in the yum::rpm_gpg_key
defined type.
gpgkey_url
Data type: Stdlib::Httpurl
Specify the source URL for the GPG key to download from.
gpgkey
Data type: Stdlib::Absolutepath
Specify the fully qualified destination file name for the GPG key to save to.
wget_path
Data type: String
Specify the path parameter to be used for the wget command.
Default value: '/bin:/usr/bin:/sbin:/usr/sbin'
rpm_path
Data type: String
Specify the path parameter to be used for the rpm command.
Default value: '/bin:/usr/bin:/sbin:/usr/sbin'
Change Log
v2.3.0 (2019-10-25)
Merged pull requests:
- Minimum changes required to use PDK #34 (ghoneycutt)
- (ci) Test with correct versions of ruby #33 (ghoneycutt)
v2.2.0 (2019-07-19)
Merged pull requests:
- Use latest versions of dependencies (continued) #32 (treydock)
- Use latest versions of dependencies #31 (ghoneycutt)
- Use upstream apache module #7 (Phil-Friderici)
v2.1.0 (2018-10-03)
Merged pull requests:
- Support Puppet 6 #30 (ghoneycutt)
- Expand acceptance tests to verify yum::server and yum::repo interactions #29 (treydock)
- Follow documentation template #28 (ghoneycutt)
v2.0.0 (2018-09-10)
Closed issues:
- Drop support for Puppet v3 #23
Merged pull requests:
- WIP - add beaker tests #26 (ghoneycutt)
- V2 #25 (ghoneycutt)
v1.4.0 (2017-09-28)
Merged pull requests:
- Add yum::repo ensure => absent functionality #22 (jeffmccune)
v1.3.0 (2017-09-19)
Merged pull requests:
- Sslcacert #21 (ghoneycutt)
v1.2.0 (2017-05-08)
Merged pull requests:
- Add ability to yum::exclude to use hiera_array() #19 (Phil-Friderici)
v1.1.0 (2017-05-03)
Merged pull requests:
- Exclude array #18 (ghoneycutt)
- Testing updates #17 (ghoneycutt)
v1.0.0 (2016-11-04)
Merged pull requests:
- Add ability to set exclude setting in yum.conf #15 (ghoneycutt)
- Style and typo fixes for README [skip ci] #13 (Phil-Friderici)
- Fix error message #12 (Phil-Friderici)
- Add README #11 (Phil-Friderici)
v0.6.0 (2016-10-17)
Merged pull requests:
- Refactors #10 (Phil-Friderici)
v0.5.0 (2016-10-13)
Closed issues:
- yum::repo::gpgkey_url_server #6
Merged pull requests:
- Fix compatibility with Puppet 4.0 to 4.3 #9 (Phil-Friderici)
v0.4.0 (2016-09-08)
Merged pull requests:
- Mirrorlist rebased #8 (Phil-Friderici)
v0.3.0 (2016-09-07)
Merged pull requests:
- Add specs tests (finished) #5 (Phil-Friderici)
- modernize testing harness and support some extra options in yum.conf #3 (ghoneycutt)
v0.2.0 (2015-02-13)
* This Change Log was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/apache (>= 5.0.0 < 6.0.0)
- puppetlabs/stdlib (>= 5.2.0 < 7.0.0)
- puppetlabs/concat (>= 6.0.0 < 7.0.0)
Copyright (C) 2013-2018 Garrett Honeycutt <code@garretthoneycutt.com> 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.