Create a password array
This commit is contained in:
parent
ceb28450ee
commit
36d777ff8f
|
@ -27,6 +27,9 @@ class sunetdrive::multinode (
|
|||
$php_memory_limit_mb = 512
|
||||
$nodenumber = $::fqdn[9,1]
|
||||
$customers = $tempcustomers - nil
|
||||
$passwords = $customers.map | $index, $customer | {
|
||||
hiera("${customer}_mysql_user_password")
|
||||
}
|
||||
user { 'www-data': ensure => present, system => true }
|
||||
sunet::system_user {'mysql': username => 'mysql', group => 'mysql' }
|
||||
ensure_resource('file', '/opt/nextcloud' , { ensure => directory, recurse => true } )
|
||||
|
|
|
@ -120,6 +120,6 @@ mysql_users =
|
|||
(
|
||||
|
||||
<%- @customers.each do |index, customer| -%>
|
||||
{ username = "nextcloud_<%= customer %>", password = "<%= hiera(customer.to_s + '_mysql_user_password') %>", default_hostgroup = 10, transaction_persistent = <%= @transaction_persistent %>, active = 1 },
|
||||
{ username = "nextcloud_<%= customer %>", password = "<%= @passwords[index] %>", default_hostgroup = 10, transaction_persistent = <%= @transaction_persistent %>, active = 1 },
|
||||
<%- end -%>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue