Puppet Class: merge_cli
- Defined in:
- modules/merge_cli/manifests/init.pp
Summary
provisions the puppet-merge cli tools used in production to This is a private class called by profile::puppetserver::gitOverview
SPDX-License-Identifier: Apache-2.0
9 10 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 37 38 39 40 41 42 43 44 45 |
# File 'modules/merge_cli/manifests/init.pp', line 9
class merge_cli (
Stdlib::Host $ca_server,
Merge_cli::Paths $paths,
Wmflib::Ensure $ensure = 'present',
Array[Stdlib::Host] $masters = [],
Array[Stdlib::Host] $workers = [],
) {
$_masters = $masters - $facts['networking']['fqdn']
$_workers = $workers - $facts['networking']['fqdn']
# TODO: refactor so everything is treated equally apart from the ca_server
$puppet_merge_conf = @("CONF")
# Generated by Puppet
MASTERS="${_masters.join(' ')}"
WORKERS="${_workers.join(' ')}"
CA_SERVER="${ca_server}"
| CONF
$python_config = {
'paths' => $paths,
}
file { '/etc/puppet-merge':
ensure => directory,
}
file {
default:
ensure => stdlib::ensure($ensure, 'file'),
mode => '0555';
'/etc/puppet-merge/shell_config.conf':
content => $puppet_merge_conf;
'/etc/puppet-merge/python_config.json':
content => $python_config.to_json();
'/usr/local/bin/puppet-merge':
source => 'puppet:///modules/merge_cli/puppet-merge.sh';
'/usr/local/bin/puppet-merge.py':
source => 'puppet:///modules/merge_cli/puppet-merge.py';
}
}
|