aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/database/mysql.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/database/mysql.pp')
-rw-r--r--manifests/profile/base/database/mysql.pp21
1 files changed, 8 insertions, 13 deletions
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index a0193cf..b4ac8ac 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -47,12 +47,6 @@
# limit for the mysql service.
# Defaults to false
#
-# [*generate_service_certificates*]
-# (Optional) Whether or not certmonger will generate certificates for
-# MySQL. This could be as many as specified by the $certificates_specs
-# variable.
-# Defaults to hiera('generate_service_certificate', false).
-#
# [*manage_resources*]
# (Optional) Whether or not manage root user, root my.cnf, and service.
# Defaults to true
@@ -62,6 +56,10 @@
# Should be an hash.
# Defaults to {}
#
+# [*mysql_max_connections*]
+# (Optional) Maximum number of connections to MySQL.
+# Defaults to hiera('mysql_max_connections', undef)
+#
# [*remove_default_accounts*]
# (Optional) Whether or not remove default MySQL accounts.
# Defaults to true
@@ -78,9 +76,9 @@ class tripleo::profile::base::database::mysql (
$certificate_specs = {},
$enable_internal_tls = hiera('enable_internal_tls', false),
$generate_dropin_file_limit = false,
- $generate_service_certificates = hiera('generate_service_certificates', false),
$manage_resources = true,
$mysql_server_options = {},
+ $mysql_max_connections = hiera('mysql_max_connections', undef),
$remove_default_accounts = true,
$step = hiera('step'),
) {
@@ -95,9 +93,6 @@ class tripleo::profile::base::database::mysql (
validate_hash($certificate_specs)
if $enable_internal_tls {
- if $generate_service_certificates {
- ensure_resource('class', 'tripleo::certmonger::mysql', $certificate_specs)
- }
$tls_certfile = $certificate_specs['service_certificate']
$tls_keyfile = $certificate_specs['service_key']
} else {
@@ -126,7 +121,7 @@ class tripleo::profile::base::database::mysql (
$mysql_server_default = {
'mysqld' => {
'bind-address' => $bind_address,
- 'max_connections' => hiera('mysql_max_connections'),
+ 'max_connections' => $mysql_max_connections,
'open_files_limit' => '-1',
'innodb_file_per_table' => 'ON',
'ssl' => $enable_internal_tls,
@@ -146,11 +141,11 @@ class tripleo::profile::base::database::mysql (
remove_default_accounts => $remove_default_accounts,
}
- if $generate_dropin_file_limit {
+ if $generate_dropin_file_limit and $manage_resources {
# Raise the mysql file limit
::systemd::service_limits { 'mariadb.service':
limits => {
- LimitNOFILE => 16384
+ 'LimitNOFILE' => 16384
}
}
}