Don't force running instances
authorJulien Cristau <julien.cristau@logilab.fr>
Fri, 11 Mar 2016 14:35:51 +0100
changeset 78 bc9fc4cffa1e
parent 77 62d8dbe7c966
child 79 a8680682057c
Don't force running instances When building an image (for, say, docker), we want to configure the application, but not actually start it immediately.
cubicweb/instances.sls
--- a/cubicweb/instances.sls	Fri Mar 04 12:31:46 2016 +0100
+++ b/cubicweb/instances.sls	Fri Mar 11 14:35:51 2016 +0100
@@ -39,19 +39,23 @@
     - require:
       - pkg: cw-web
 
+{% if config.cwapp.get('running', True) %}
 cw-{{vhostname}}-{{name}}-running:
   cubicweb_instance.running:
     - name: {{name}}
     - require:
       - cubicweb_instance: cw-{{vhostname}}-{{name}}
+{% endif %}
 
 configure cw-{{vhostname}}-{{name}}:
   ini.options_present:
     - name: /etc/cubicweb.d/{{name}}/all-in-one.conf
     - sections:
         {{ config.get('cwapp_config_options', {}) }}
+{% if config.cwapp.get('running', True) %}
     - watch_in:
       - cubicweb_instance: cw-{{vhostname}}-{{name}}-running
+{% endif %}
  {% endfor %}
 {% endfor %}