Files
packstack/packstack/puppet/templates/mysql.pp
Flaper Fesp b3246b4373 Don't create modules' db classes if the module isn't marked for install
Since packstack introduced a DB_PW for each module, it started failing
when 1 of those modules is not marked for install because of some
missing variables in the CONF dict when formatting mysql.pp

This patch splits mysql configs per module in 3 different pp files and
includes them just when those modules are marked for install.

Fixes bz#903191

Change-Id: I7c1d86c7c80aa6e801f0ea68e2379abc01ab4967
2013-01-23 15:03:17 +01:00

36 lines
983 B
Puppet

class {"mysql::server":
config_hash => {bind_address => "0.0.0.0",
root_password => "%(CONFIG_MYSQL_PW)s",}
}
# deleting database users for security
# this is done in mysql::server::account_security but has problems
# when there is no fqdn, so we're defining a slightly different one here
database_user { [ 'root@127.0.0.1', 'root@::1', '@localhost', '@%%' ]:
ensure => 'absent', require => Class['mysql::config'],
}
if ($::fqdn != "") {
database_user { [ "root@${::fqdn}", "@${::fqdn}"]:
ensure => 'absent', require => Class['mysql::config'],
}
}
if ($::fqdn != $::hostname) {
database_user { ["root@${::hostname}", "@${::hostname}"]:
ensure => 'absent', require => Class['mysql::config'],
}
}
class {"keystone::db::mysql":
password => "%(CONFIG_KEYSTONE_DB_PW)s",
allowed_hosts => "%%",
}
firewall { '001 mysql incoming':
proto => 'tcp',
dport => ['3306'],
action => 'accept',
}