This commit is contained in:
35
manifests/r10k/install.pp
Normal file
35
manifests/r10k/install.pp
Normal file
@@ -0,0 +1,35 @@
|
||||
## 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) {
|
||||
# install required packages
|
||||
package { $pt_r10k_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
before => Package['r10k'],
|
||||
}
|
||||
|
||||
# install r10k via gem
|
||||
package { 'r10k':
|
||||
ensure => $pt_pkg_ensure,
|
||||
provider => gem,
|
||||
}
|
||||
|
||||
# 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),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user