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 = ...@@ -177,7 +177,7 @@ context =
[template-mariadb] [template-mariadb]
< = download-base < = download-base
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 7e9ec4e0d52e48bd03303a9d9f16627a md5sum = 4ec38e3b2e37028a2350b0606cac9281
link-binary = link-binary =
${coreutils:location}/bin/basename ${coreutils:location}/bin/basename
${coreutils:location}/bin/cat ${coreutils:location}/bin/cat
......
...@@ -24,9 +24,9 @@ recipe = slapos.cookbook:publish.serialised ...@@ -24,9 +24,9 @@ recipe = slapos.cookbook:publish.serialised
{% for database in database_list -%} {% for database in database_list -%}
{% if database.get('user') -%} {% if database.get('user') -%}
{% do publish_database_list.append("mysql://" ~ database['user'] ~ ":" ~ database['password'] ~ "@" ~ ip ~ ":" ~ port ~ "/" ~ database['name']) -%} {% 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']) -%} {% do publish_database_list.append("mysql://" ~ ip ~ ":" ~ port ~ "/" ~ database['name']) -%}
{%- endif %} {% endif -%}
{% endfor -%} {% endfor -%}
{{ dumps(publish_database_list) }} {{ dumps(publish_database_list) }}
{% endmacro -%} {% 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