Commit fe7ea950 authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Drop unneeded executable permissions.

parent 8cb74356
...@@ -19,7 +19,7 @@ md5sum = 79109ae720d5471cb2dd15e63fdf4dcf ...@@ -19,7 +19,7 @@ md5sum = 79109ae720d5471cb2dd15e63fdf4dcf
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 9312af2f9d9faf06d2f26f073ad60180 md5sum = 22270cd739fe00c45d0605dfb7edd2eb
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
...@@ -47,7 +47,7 @@ md5sum = 6465212fdc7fe9076a0c929d9f14da14 ...@@ -47,7 +47,7 @@ md5sum = 6465212fdc7fe9076a0c929d9f14da14
[template-create-erp5-site] [template-create-erp5-site]
filename = instance-create-erp5-site.cfg.in filename = instance-create-erp5-site.cfg.in
md5sum = 71cef1d06065951ab4cf43eb13f311a3 md5sum = 1186c5804bdc679d8a31ac70cd85d51f
[template-create-erp5-site-real] [template-create-erp5-site-real]
filename = instance-create-erp5-site-real.cfg.in filename = instance-create-erp5-site-real.cfg.in
...@@ -55,7 +55,7 @@ md5sum = 79f789360e71146486c82a7a10834bae ...@@ -55,7 +55,7 @@ md5sum = 79f789360e71146486c82a7a10834bae
[template-postfix] [template-postfix]
filename = instance-postfix.cfg.in filename = instance-postfix.cfg.in
md5sum = 90a017581116f14014a039d38ef36ffd md5sum = 2fd9ec619456fd00e7482cebc5c41f76
[template-postfix-master-cf] [template-postfix-master-cf]
filename = postfix_master.cf.in filename = postfix_master.cf.in
...@@ -71,7 +71,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0 ...@@ -71,7 +71,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = ec143441fac42ce6b3a183724298bc6b md5sum = 9d6c7b1a17cf2a5987e8c9f4c9239736
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
...@@ -87,11 +87,11 @@ md5sum = 84aba4fa10d3087fbcc1d979df90fab9 ...@@ -87,11 +87,11 @@ md5sum = 84aba4fa10d3087fbcc1d979df90fab9
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = e65672c423d603e5fa516ad811cc1fa9 md5sum = 3a029d0d94e4f60395b8b202f5422e91
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 049d4153990374dc130403c04accaf13 md5sum = aa2092e478131d7c6d55fa9d12b6b0f2
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -16,8 +16,12 @@ per partition. No more (undefined result), no less (IndexError). ...@@ -16,8 +16,12 @@ per partition. No more (undefined result), no less (IndexError).
{% do apache_ip_list.append('[' ~ ipv6 ~ ']') -%} {% do apache_ip_list.append('[' ~ ipv6 ~ ']') -%}
{% endif -%} {% endif -%}
[simplefile] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
[simplefile]
< = jinja2-template-base
template = inline:{{ '{{ content }}' }} template = inline:{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
...@@ -95,7 +99,7 @@ backend-dict = {{ dumps(haproxy_dict) }} ...@@ -95,7 +99,7 @@ backend-dict = {{ dumps(haproxy_dict) }}
ip = {{ ipv4 }} ip = {{ ipv4 }}
[haproxy-cfg] [haproxy-cfg]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = {{ parameter_dict['template-haproxy-cfg'] }} template = {{ parameter_dict['template-haproxy-cfg'] }}
rendered = ${directory:etc}/haproxy.cfg rendered = ${directory:etc}/haproxy.cfg
context = section parameter_dict haproxy-cfg-parameter-dict context = section parameter_dict haproxy-cfg-parameter-dict
...@@ -132,7 +136,7 @@ ca-cert = ${apache-ssl-client:cert} ...@@ -132,7 +136,7 @@ ca-cert = ${apache-ssl-client:cert}
crl = ${apache-ssl-client:crl} crl = ${apache-ssl-client:crl}
[apache-conf] [apache-conf]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = {{ parameter_dict['template-apache-conf'] }} template = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:apache-conf}/apache.conf rendered = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict context = section parameter_dict apache-conf-parameter-dict
......
...@@ -14,6 +14,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -14,6 +14,7 @@ recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-create-erp5-site-real'] }} template = {{ parameter_dict['template-create-erp5-site-real'] }}
rendered = ${buildout:directory}/instance-create-erp5-site-real.cfg rendered = ${buildout:directory}/instance-create-erp5-site-real.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 644
context = context =
import urlparse urlparse import urlparse urlparse
section publish publish section publish publish
......
...@@ -33,8 +33,16 @@ recipe = slapos.cookbook:publish.serialised ...@@ -33,8 +33,16 @@ recipe = slapos.cookbook:publish.serialised
database-list = {{ render_database_list(database_list) }} database-list = {{ render_database_list(database_list) }}
test-database-list = {{ render_database_list(test_database_list) }} test-database-list = {{ render_database_list(test_database_list) }}
[simplefile] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
[jinja2-template-executable]
< = jinja2-template-base
mode = 755
[simplefile]
< = jinja2-template-base
template = inline:{{ '{{ content }}' }} template = inline:{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
...@@ -124,7 +132,7 @@ ssl-{{ key }} = {{ value }} ...@@ -124,7 +132,7 @@ ssl-{{ key }} = {{ value }}
{% endfor %} {% endfor %}
[my-cnf] [my-cnf]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc}/mariadb.cnf rendered = ${directory:etc}/mariadb.cnf
template = {{ parameter_dict['template-my-cnf'] }} template = {{ parameter_dict['template-my-cnf'] }}
context = section parameter_dict my-cnf-parameters context = section parameter_dict my-cnf-parameters
...@@ -133,7 +141,7 @@ context = section parameter_dict my-cnf-parameters ...@@ -133,7 +141,7 @@ context = section parameter_dict my-cnf-parameters
database-list = {{ dumps(database_list + test_database_list) }} database-list = {{ dumps(database_list + test_database_list) }}
[init-script] [init-script]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-executable
# XXX: is there a better location ? # XXX: is there a better location ?
rendered = ${directory:etc}/mariadb_initial_setup.sql rendered = ${directory:etc}/mariadb_initial_setup.sql
template = {{ parameter_dict['template-mariadb-initial-setup'] }} template = {{ parameter_dict['template-mariadb-initial-setup'] }}
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
{% set smtpd_sasl_user = slapparameter_dict['smtpd-sasl-user'] -%} {% set smtpd_sasl_user = slapparameter_dict['smtpd-sasl-user'] -%}
{% set smtpd_sasl_password = slapparameter_dict['smtpd-sasl-password'] -%} {% set smtpd_sasl_password = slapparameter_dict['smtpd-sasl-password'] -%}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[smtpd-password] [smtpd-password]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
storage-path = storage-path =
...@@ -64,7 +68,7 @@ cyrus-sasldb = ${directory:etc-cyrus}/postfix.gdbm ...@@ -64,7 +68,7 @@ cyrus-sasldb = ${directory:etc-cyrus}/postfix.gdbm
recipe = slapos.cookbook:userinfo recipe = slapos.cookbook:userinfo
[smtp-sasl-passwd] [smtp-sasl-passwd]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc-postfix}/sasl_passwd rendered = ${directory:etc-postfix}/sasl_passwd
{% if relay -%} {% if relay -%}
template = inline:{{ "{{ host }} {{ sasl_credential }}" }} template = inline:{{ "{{ host }} {{ sasl_credential }}" }}
...@@ -77,7 +81,7 @@ context = ...@@ -77,7 +81,7 @@ context =
mode = 600 mode = 600
[{{ section('cyrus-smtpd-conf') }}] [{{ section('cyrus-smtpd-conf') }}]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc-cyrus}/smtpd.conf rendered = ${directory:etc-cyrus}/smtpd.conf
template = inline: template = inline:
pwcheck_method: auxprop pwcheck_method: auxprop
...@@ -95,7 +99,7 @@ command = ...@@ -95,7 +99,7 @@ command =
update-command = ${:command} update-command = ${:command}
[divert] [divert]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc-postfix}/divert rendered = ${directory:etc-postfix}/divert
{% if divert -%} {% if divert -%}
template = inline:{{ "/.*/ {{ ', '.join(divert) }}" }} template = inline:{{ "/.*/ {{ ', '.join(divert) }}" }}
...@@ -121,7 +125,7 @@ update = ...@@ -121,7 +125,7 @@ update =
${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}' ${:openssl} req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout '${:key}' -out '${:cert}'
[{{ section('postfix-main-cf') }}] [{{ section('postfix-main-cf') }}]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc-postfix}/main.cf rendered = ${directory:etc-postfix}/main.cf
template = {{ parameter_dict['template-postfix-main-cf'] }} template = {{ parameter_dict['template-postfix-main-cf'] }}
context = context =
...@@ -144,13 +148,13 @@ context = ...@@ -144,13 +148,13 @@ context =
key dh_2048 smtpd-ssl:dh-2048 key dh_2048 smtpd-ssl:dh-2048
[{{ section('postfix-master-cf') }}] [{{ section('postfix-master-cf') }}]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc-postfix}/master.cf rendered = ${directory:etc-postfix}/master.cf
template = {{ parameter_dict['template-postfix-master-cf'] }} template = {{ parameter_dict['template-postfix-master-cf'] }}
context = key smtp configuration:smtp context = key smtp configuration:smtp
[aliases] [aliases]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = {{ parameter_dict['template-postfix-aliases'] }} template = {{ parameter_dict['template-postfix-aliases'] }}
rendered = ${directory:etc-postfix}/aliases rendered = ${directory:etc-postfix}/aliases
context = context =
......
...@@ -14,6 +14,10 @@ partition. No more (undefined result), no less (IndexError). ...@@ -14,6 +14,10 @@ partition. No more (undefined result), no less (IndexError).
-#} -#}
{% set ipv4 = (ipv4_set | list)[0] -%} {% set ipv4 = (ipv4_set | list)[0] -%}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
{% if slapparameter_dict['mysql-test-url-list'] -%} {% if slapparameter_dict['mysql-test-url-list'] -%}
[{{ section('test-runner') }}] [{{ section('test-runner') }}]
recipe = slapos.cookbook:erp5.test recipe = slapos.cookbook:erp5.test
...@@ -143,7 +147,7 @@ hostalias-dict = {{ dumps(slapparameter_dict['hostalias-dict']) }} ...@@ -143,7 +147,7 @@ hostalias-dict = {{ dumps(slapparameter_dict['hostalias-dict']) }}
# ...so it's not possible to merge these templates (not a big deal anyway). # ...so it's not possible to merge these templates (not a big deal anyway).
[hostaliases] [hostaliases]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = inline: {{ ' template = inline: {{ '
{% for alias, aliased in host_dict.items() -%} {% for alias, aliased in host_dict.items() -%}
{{ alias }} {{ aliased }} {{ alias }} {{ aliased }}
...@@ -153,7 +157,7 @@ rendered = ${directory:etc}/hostaliases ...@@ -153,7 +157,7 @@ rendered = ${directory:etc}/hostaliases
context = key host_dict hosts-parameter:hostalias-dict context = key host_dict hosts-parameter:hostalias-dict
[hosts] [hosts]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = inline: {{ ' template = inline: {{ '
{% for alias, aliased in host_dict.items() -%} {% for alias, aliased in host_dict.items() -%}
{{ aliased }} {{ alias }} {{ aliased }} {{ alias }}
...@@ -171,7 +175,7 @@ context = key host_dict hosts-parameter:host-dict ...@@ -171,7 +175,7 @@ context = key host_dict hosts-parameter:host-dict
('_key', 'neo.key')) -%} ('_key', 'neo.key')) -%}
{% if k in storage_dict -%} {% if k in storage_dict -%}
[{{ section('neo-ssl-' + k[1:]) }}] [{{ section('neo-ssl-' + k[1:]) }}]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:etc}/{{v}} rendered = ${directory:etc}/{{v}}
template = inline:{{'{{'}}pem}} template = inline:{{'{{'}}pem}}
context = key pem :pem context = key pem :pem
...@@ -204,7 +208,7 @@ target-directory = ${directory:instance-etc} ...@@ -204,7 +208,7 @@ target-directory = ${directory:instance-etc}
file-list = {{ parameter_dict['site-zcml'] }} file-list = {{ parameter_dict['site-zcml'] }}
[{{ section('zope-inituser') }}] [{{ section('zope-inituser') }}]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
rendered = ${directory:instance}/inituser rendered = ${directory:instance}/inituser
template = inline:{{ slapparameter_dict['inituser-login'] }}:{SHA}{{ hashlib.sha1(slapparameter_dict['inituser-password']).digest().encode('base64').rstrip() }} template = inline:{{ slapparameter_dict['inituser-login'] }}:{SHA}{{ hashlib.sha1(slapparameter_dict['inituser-password']).digest().encode('base64').rstrip() }}
mode = 600 mode = 600
...@@ -253,7 +257,7 @@ webdav = {{ dumps(webdav) }} ...@@ -253,7 +257,7 @@ webdav = {{ dumps(webdav) }}
timerserver-interval = {{ dumps(timerserver_interval) }} timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base] [zope-conf-base]
recipe = slapos.recipe.template:jinja2 < = jinja2-template-base
template = {{ parameter_dict['zope-conf-template'] }} template = {{ parameter_dict['zope-conf-template'] }}
[logrotate-entry-base] [logrotate-entry-base]
......
...@@ -4,6 +4,7 @@ extends = {{ instance_common_cfg }} ...@@ -4,6 +4,7 @@ extends = {{ instance_common_cfg }}
[jinja2-template-base] [jinja2-template-base]
context += context +=
raw slapos_core_version {{ slapos_core_version }} raw slapos_core_version {{ slapos_core_version }}
mode = 644
[dynamic-template-cloudooo-parameters] [dynamic-template-cloudooo-parameters]
cairo = {{ cairo_location }} cairo = {{ cairo_location }}
......
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