Puppet Class: foreman::repo
- Defined in:
- manifests/repo.pp
Overview
Configure the foreman repo
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'manifests/repo.pp', line 11
class foreman::repo (
Optional[Variant[Enum['nightly'], Pattern['^\d+\.\d+$']]] $repo = undef,
Boolean $gpgcheck = true,
Stdlib::HTTPUrl $yum_repo_baseurl = 'https://yum.theforeman.org',
) {
if $repo {
foreman::repos { 'foreman':
repo => $repo,
gpgcheck => $gpgcheck,
yum_repo_baseurl => $yum_repo_baseurl,
before => Anchor['foreman::repo'],
}
if $facts['os']['family'] == 'RedHat' {
package { 'foreman':
ensure => "el${facts['os']['release']['major']}",
enable_only => true,
provider => 'dnfmodule',
require => Foreman::Repos['foreman'],
}
}
}
# An anchor is used because it can be collected
anchor { 'foreman::repo': } # lint:ignore:anchor_resource
}
|