From 7c49d580a7496d6edea99d2bebce6719a62d2501 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Tue, 28 Feb 2023 12:44:15 +0100 Subject: [PATCH] Make config optional --- manifests/proxysql.pp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/manifests/proxysql.pp b/manifests/proxysql.pp index 05fc6b9..1c2b7fb 100644 --- a/manifests/proxysql.pp +++ b/manifests/proxysql.pp @@ -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':