3
0
Files
puppet_cd/manifests/r10k/install.pp

45 lines
1.2 KiB
Puppet

## puppet_cd::r10k::install.pp
# Module name: puppet_cd
# Author: Arne Teuke (arne_teuke@confdroid)
# @summary Class manages r10k installation for the puppet_cd module.
###############################################################################
class puppet_cd::r10k::install (
) inherits puppet_cd::params {
# if ($pt_pm_fqdn == $fqdn) and ($pt_use_r10k == true) {
if $pt_use_r10k == true {
# install required packages
package { $pt_r10k_pkg:
ensure => $pt_pkg_ensure,
before => Exec['enable_crb'],
}
# enable CRB and install development_tools
exec { 'enable_crb':
command => 'dnf config-manager --set-enabled crb',
unless => 'dnf repolist --disabled | grep -qE "crb|CodeReady"',
path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'],
}
# install r10k via gem
package { 'r10k':
ensure => $pt_pkg_ensure,
provider => gem,
require Exec['enable_crb'],
}
# configure r10k.yaml
file { $pt_r10k_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0440',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => unconfined_u,
content => template($pt_r10k_erb),
}
}
}