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,11 +55,13 @@ 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'),
} }
if $manage_config {
file { '/opt/proxysql/proxysql.cnf': file { '/opt/proxysql/proxysql.cnf':
ensure => present, ensure => present,
content => template('sunetdrive/proxysql/proxysql.cnf.erb'), content => template('sunetdrive/proxysql/proxysql.cnf.erb'),
mode => '0644', mode => '0644',
} }
}
file { '/opt/proxysql/my.cnf': file { '/opt/proxysql/my.cnf':
ensure => present, ensure => present,