Puppet Class: puppetserver::g10k
- Defined in:
- modules/puppetserver/manifests/g10k.pp
Summary
install and manage g10kOverview
SPDX-License-Identifier: Apache-2.0
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'modules/puppetserver/manifests/g10k.pp', line 7
class puppetserver::g10k (
Wmflib::Ensure $ensure = 'present',
Stdlib::Unixpath $config_file = '/etc/puppet/g10k.conf',
Stdlib::Unixpath $cache_dir = '/var/cache/g10k',
Hash[String, Puppetmaster::R10k::Source] $sources = {},
) {
ensure_packages('g10k')
$_sources = Hash($sources.map |$items| {
[$items[0], { 'basedir' => "${puppetserver::environments_dir}_staging" } + $items[1]]
})
$config = {
'cachedir' => $cache_dir,
'sources' => $_sources,
}
file { $cache_dir:
ensure => stdlib::ensure($ensure, 'directory'),
}
file { $config_file:
ensure => stdlib::ensure($ensure, file),
content => $config.to_yaml,
}
}
|