Try multinode proxysql

This commit is contained in:
Micke Nordin 2023-02-28 10:20:06 +01:00
parent 9dd730fcea
commit 7728f8a272
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 12 additions and 1 deletions

View file

@ -83,6 +83,17 @@ class sunetdrive::multinode (
minute => '25',
hour => '4',
}
file { '/opt/proxysql':
ensure => directory,
}
file { '/opt/proxysql/proxysql.cnf':
ensure => file,
force => true,
owner => 'root',
group => 'root',
content => template('sunetdrive/multinode/proxysql.cnf.erb'),
mode => '0644',
}
}
file { '/opt/nextcloud/apache.php.ini':
ensure => file,

View file

@ -119,6 +119,6 @@ mysql_query_rules =
mysql_users =
(
<%- $customers.each do |customer| -%>
{ username = "nextcloud_<%= customer %>", password = "<%= @mysql_user_password %>", default_hostgroup = 10, transaction_persistent = <%= @transaction_persistent %>, active = 1 },
{ username = "nextcloud_<%= customer %>", password = "<%= hiera(customer + '_mysql_user_password') %>", default_hostgroup = 10, transaction_persistent = <%= @transaction_persistent %>, active = 1 },
<%- end -%>
)