[debops.nginx] Allow empty 'item.name' parameter

This patch allows to set the 'item.name' parameter as empty to tell
nginx that a given server should not have a 'server_name' option
defined.
parent 00b65eca
......@@ -436,7 +436,7 @@
{% endif %}
{% endif %}
{% set nginx__tpl_hostname_domain = item.hostname_domain | d((item.name if item.name is string else item.name[0]).split('.')[1:] | join('.')) %}
{% set nginx__tpl_hostname_domain = item.hostname_domain | d(((item.name if item.name is string else item.name[0]) if item.name|d() else ansible_fqdn).split('.')[1:] | join('.')) %}
{% set nginx__tpl_final_hostname_domain = [] %}
{% if item.hostname_domain is undefined %}
{% for domain_suffix in nginx__hostname_domains[::-1] %}
......
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