Managing software repositories (yum, zypper)
This module has been tested to work on the following systems with Puppet v3 (with and without the future parser) and Puppet v4 (with strict variables) using Ruby versions 1.8.7 (Puppet v3 only), 1.9.3, 2.0.0, 2.1.0 and 2.3.1. It has also been tested on Puppet 4, 5 and 6.
- EL 7
- EL 6
- EL 5
- Suse 11
- Suse 12
This module uses the custom types zypprepo and rpmkey as dependencies.
Please ensure that both of these modules are available in your setup:
The swrepo
class is used to prepare and pass data to the swrepo::repo
define.
The module will stay passive when no repositories are specified to it.
It will set the repository type (yum or zypper) accordingly to the OS family running on. It will also allow you to merge hiera data through all levels. This is useful for specifying repositories at different levels of the hierarchy and having them all included in the catalog.
Type of repository type to configure. Valid values are 'yum' and 'zypper'. If not specified (undef) it will set the repotype accordingly to the running OS family.
- Default: undef (uses 'yum' for RHEL and 'zypper' for Suse)
Hash of repositories to configure. This hash will be passed to swrepo::repo define via create_resources.
- Default: undef
swrepo::repos:
'repo1':
baseurl: 'http://params.hash/repo1'
'repo2':
baseurl: 'http://params.hash/repo2'
autorefresh: true
priority: 42
The above will add two repositories: repo1 with defaults and repo2 with autorefresh and priority parameters changed.
Trigger to control merges of all found instances of repositories in Hiera. This is useful for specifying repositories resources at different levels of the hierarchy and having them all included in the catalog.
- Default: false
The swrepo::repo
definition is used to configure repositories.
You can also specify swrepo::repos
from hiera as a hash of repositories and they will be created by the base class using create_resources.
Specify the base URL for the repository.
- Default: N/A
Specify the type of repository to configure. Valid values are 'yum' and 'zypper'.
- Default: N/A
Specify if autorefresh will be used.
Hint: only used for zypper, ignored on yum
- Default: undef
A human-readable description of the repository.
- Default: undef
Trigger if $baseurl should be converted to lowercase characters.
- Default: false
Specify if the repository will be used.
- Default: true
List of shell globs. Matching packages will never be considered in updates or installs for the repository.
- Default: undef
Specify if GPG signature checking will be used for packages from this repository.
- Default: undef
KeyID for the GPG key to import. 8 char hex key in uppercase. When $gpgkey_source is not specified too, the module will fail.
- Default: undef
URL pointing to the ASCII-armored GPG key file for the repository. When $gpgkey_keyid is not specified too, this will be ignored silently.
- Default: undef
Specify if keeppackages will be used.
Hint: only used for zypper, ignored on yum
- Default: undef
Priority of this repository from 1-99. Requires that the priorities plugin is installed and enabled.
- Default: undef
URL to the proxy server that should be used.
Hint: only used for yum, ignored on zypper
- Default: undef
Specify the type
parameter. Valid values are 'yum', 'yast2', 'rpm-md', and 'plaindir'.
Hint: only used for zypper, ignored on yum
- Default: undef
- 2.0.0 Adds support for Puppet 5 & 6 Copied dependencies have been removed. It is needed to include stschulte/puppet-rpmkey and voxpupuli/puppet-zypprepo manually instead.
- 1.0.0 First stable release