Add defaults for driver and host

This commit is contained in:
Oliver Davies 2019-01-24 02:43:53 +00:00
parent 7d3d206254
commit 9b332361d3

View file

@ -5,8 +5,8 @@
{% for key, values in item.1.settings.databases.iteritems() %}
{% for target, values in values.iteritems() %}
$databases['{{ key }}']['{{ target }}'] = [
'driver' => '{{ values.driver }}',
'host' => '{{ values.host }}',
'driver' => '{{ values.driver|default('mysql') }}',
'host' => '{{ values.host|default('localhost') }}',
'database' => '{{ values.database }}',
'username' => '{{ values.username }}',
'password' => '{{ values.password }}',