Commit dd939dd8 authored by Vincent Pelletier's avatar Vincent Pelletier

fixup! erp5.mariadb: Make user and password optional.

Fix spurious newlines being emitted, breaking published values.
Also, remove unneeded whitespace trimming on "else" statement.
parent f3b4e1df
......@@ -177,7 +177,7 @@ context =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum = 7e9ec4e0d52e48bd03303a9d9f16627a
md5sum = 4ec38e3b2e37028a2350b0606cac9281
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
......
......@@ -24,9 +24,9 @@ recipe = slapos.cookbook:publish.serialised
{% for database in database_list -%}
{% if database.get('user') -%}
{% do publish_database_list.append("mysql://" ~ database['user'] ~ ":" ~ database['password'] ~ "@" ~ ip ~ ":" ~ port ~ "/" ~ database['name']) -%}
{%- else -%}
{% else -%}
{% do publish_database_list.append("mysql://" ~ ip ~ ":" ~ port ~ "/" ~ database['name']) -%}
{%- endif %}
{% endif -%}
{% endfor -%}
{{ dumps(publish_database_list) }}
{% endmacro -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment