ansible-role-phpmyadmin/templates/pma.php.j2
2024-01-04 10:25:54 +01:00

32 lines
1 KiB
Django/Jinja

{{ ansible_managed | comment }}
<?php
$cfg['ForceSSL'] = true;
$cfg['blowfish_secret'] = '{{ phpmyadmin_blowfish_secret }}';
$cfg['TempDir'] = '{{ phpmyadmin_tmp }}';
{% if phpmyadmin_hosts is defined %}
$i = 0;
$hosts = array (
{% for host in phpmyadmin_hosts %}
"{{ host.name }}" => "{{ host.address }}",
{% endfor %}
);
foreach ($hosts as $verbose => $host) {
$i++;
$cfg['Servers'][$i]['verbose'] = $verbose;
$cfg['Servers'][$i]['host'] = $host;
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['pmadb'] = '{{ phpmyadmin_database }}';
$cfg['Servers'][$i]['controlhost'] = $host;
$cfg['Servers'][$i]['controlport'] = '3306';
$cfg['Servers'][$i]['controluser'] = '{{ phpmyadmin_database }}';
$cfg['Servers'][$i]['controlpass'] = '{{ phpmyadmin_database_password }}';
}
{% endif %}