diff --git a/manifests/multinode.pp b/manifests/multinode.pp index 93715f1..3e101e1 100644 --- a/manifests/multinode.pp +++ b/manifests/multinode.pp @@ -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, diff --git a/templates/multinode/proxysql.cnf.erb b/templates/multinode/proxysql.cnf.erb index 217f80f..337d787 100644 --- a/templates/multinode/proxysql.cnf.erb +++ b/templates/multinode/proxysql.cnf.erb @@ -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 -%> )