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