Make config optional

This commit is contained in:
Micke Nordin 2023-02-28 12:44:15 +01:00
parent e5c55de042
commit 7c49d580a7
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -3,6 +3,7 @@ class sunetdrive::proxysql (
$bootstrap = undef,
$location = undef,
$proxysql_container_name = 'proxysql_proxysql_1',
$manage_config = true,
) {
# Config from group.yaml
@ -54,10 +55,12 @@ class sunetdrive::proxysql (
require => Package['nagios-nrpe-server'],
content => template('sunetdrive/proxysql/check_mysql_server_status.erb'),
}
file { '/opt/proxysql/proxysql.cnf':
ensure => present,
content => template('sunetdrive/proxysql/proxysql.cnf.erb'),
mode => '0644',
if $manage_config {
file { '/opt/proxysql/proxysql.cnf':
ensure => present,
content => template('sunetdrive/proxysql/proxysql.cnf.erb'),
mode => '0644',
}
}
file { '/opt/proxysql/my.cnf':