Commit 9f55ce2c authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

caddy-frontend: Avoid repetition of parts

parent 722a40a2
...@@ -30,7 +30,7 @@ md5sum = ef06c04a5aa33b103dc1d25d0dfe8217 ...@@ -30,7 +30,7 @@ md5sum = ef06c04a5aa33b103dc1d25d0dfe8217
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = a473ded24aed999abed3d79a08bb09a6 md5sum = 0dc409d7d3226a6727ec340ebf79f8da
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
......
...@@ -125,22 +125,6 @@ output = {{ plugin_directory }}/${:name} ...@@ -125,22 +125,6 @@ output = {{ plugin_directory }}/${:name}
[slave-log-directory-dict] [slave-log-directory-dict]
{{slave_reference}} = {{ slave_log_folder }} {{slave_reference}} = {{ slave_log_folder }}
[slave-log-directories]
<= slave-log-directory-dict
recipe = slapos.cookbook:mkdirectory
{% do part_list.append('slave-log-directories') %}
[caddy-log-access]
< = jinja2-template-base
template = {{frontend_configuration.get('template-log-access')}}
rendered = {{frontend_configuration.get('log-access-configuration')}}
extra-context =
section slave_log_directory slave-log-directory-dict
section slave_password slave-password
section parameter_dict caddy-log-access-parameters
{% do part_list.append('caddy-log-access') %}
[slave-password] [slave-password]
{{ slave_reference }} = {{ '${' + slave_password_section + ':passwd}' }} {{ slave_reference }} = {{ '${' + slave_password_section + ':passwd}' }}
...@@ -350,6 +334,23 @@ recipe = slapos.cookbook:publish ...@@ -350,6 +334,23 @@ recipe = slapos.cookbook:publish
{# End of the main for loop#} {# End of the main for loop#}
{% endfor %} {% endfor %}
[slave-log-directories]
<= slave-log-directory-dict
recipe = slapos.cookbook:mkdirectory
{% do part_list.append('slave-log-directories') %}
[caddy-log-access]
< = jinja2-template-base
template = {{frontend_configuration.get('template-log-access')}}
rendered = {{frontend_configuration.get('log-access-configuration')}}
extra-context =
section slave_log_directory slave-log-directory-dict
section slave_password slave-password
section parameter_dict caddy-log-access-parameters
{% do part_list.append('caddy-log-access') %}
############################################### ###############################################
### Prepare virtualhost for slaves using cache ### Prepare virtualhost for slaves using cache
......
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