Commit 070697ba authored by Walter Heck's avatar Walter Heck

Adjust database names for icinga in a few more places

parent ce510740
......@@ -4,14 +4,14 @@ class opstheater::profile::icinga::db (
$mysql_whitelist_range = hiera('opstheater::mysql::whitelist_range'),
) inherits opstheater::profile::params {
mysql::db { 'icinga2_web':
mysql::db { 'icinga2':
user => 'icinga2_web',
password => $icinga2_webdb_password,
host => $mysql_whitelist_range,
grant => ['ALL'],
}
mysql::db { 'icinga2_data':
mysql::db { 'icinga2':
user => 'icinga2',
password => $icinga2_ido_password,
host => $mysql_whitelist_range,
......
......@@ -16,7 +16,7 @@ class opstheater::profile::icinga::server (
class { 'icinga2::feature::idomysql':
host => $icinga2_db_ipaddress,
port => '3306',
database => 'icinga2_data',
database => 'icinga2',
user => 'icinga2',
password => $icinga2_ido_password,
import_schema => true,
......
......@@ -115,7 +115,7 @@ class opstheater::profile::icinga::web (
if $manage_epel_repo {
class { 'epel':
before => [Package['php-ZendFramework'], Package['php-ZendFramework-Db-Adapter-Pdo-Mysql']]
before => [Package['php-ZendFramework'], Package['php-ZendFramework-Db-Adapter-Pdo-Mysql'], Package['php-Icinga'], Package['icingacli']]
}
}
......@@ -237,8 +237,8 @@ class opstheater::profile::icinga::web (
exec { 'populate-icinga2_web-mysql-db':
path => '/bin:/usr/bin:/sbin:/usr/sbin',
unless => "[ `mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2_web -ABN -e 'select 1 from icingaweb_user limit 1'` -eq 1 ]",
command => "mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2_web < /usr/share/doc/icingaweb2/schema/mysql.schema.sql; mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2_web -e \"INSERT INTO icingaweb_user (name, active, password_hash) VALUES (\'icingaadmin\', 1, \'\\\$1\\\$iQSrnmO9\\\$T3NVTu0zBkfuim4lWNRmH.\');\"",
unless => "[ `mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2 -ABN -e 'select 1 from icingaweb_user limit 1'` -eq 1 ]",
command => "mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2 < /usr/share/doc/icingaweb2/schema/mysql.schema.sql; mysql -h ${icinga2_db_ipaddress} -uicinga2_web -p${icinga2_webdb_password} icinga2 -e \"INSERT INTO icingaweb_user (name, active, password_hash) VALUES (\'icingaadmin\', 1, \'\\\$1\\\$iQSrnmO9\\\$T3NVTu0zBkfuim4lWNRmH.\');\"",
require => [ Class['::mysql::client'], Package['icingaweb2'] ],
} ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment