Skip to content

Commit

Permalink
add dbconfig params for ido mysql database
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz authored and n00by committed Apr 26, 2018
1 parent 686389b commit 3e839f3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions manifests/feature/idomysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,52 @@
ensure => installed,
before => Icinga2::Feature['ido-mysql'],
}

# dbconfig config for Debian or Ubuntu
if $::osfamily == 'debian' {
file_line { "dbc-${ido_mysql_package}-install":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_install='false'",
match => '^dbc_install\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbtype":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbtype='mysql'",
match => '^dbc_dbtype\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbuser":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbuser='${user}'",
match => '^dbc_dbuser\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbpass":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbpass='${password}'",
match => '^dbc_dbpass\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbname":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbname='${database}'",
match => '^dbc_dbname\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbserver":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbserver='${host}'",
match => '^dbc_dbserver\s*=',
require => Package[$ido_mysql_package];
}
file_line { "dbc-${ido_mysql_package}-dbport":
path => "/etc/dbconfig-common/${ido_mysql_package}.conf",
line => "dbc_dbport='${port}'",
match => '^dbc_dbport\s*=',
require => Package[$ido_mysql_package];
}
} # debian dbconfig
}

# import db schema
Expand Down

0 comments on commit 3e839f3

Please sign in to comment.