[cubicweb/uwsgi] uwsgi enabled or not
authorArthur Lutz <arthur.lutz@logilab.fr>
Fri, 03 Feb 2017 11:51:02 +0100
changeset 117 70ad5cc2bf8d
parent 116 1c7834b59c18
child 118 28a570c2654a
[cubicweb/uwsgi] uwsgi enabled or not
cubicweb/uwsgi/init.sls
--- a/cubicweb/uwsgi/init.sls	Fri Feb 03 11:43:59 2017 +0100
+++ b/cubicweb/uwsgi/init.sls	Fri Feb 03 11:51:02 2017 +0100
@@ -25,7 +25,8 @@
     - require:
       - pkg: uwsgi install
 
-{% if 'enabled' in config.cwapp_uwsgi_options.keys() and config.cwapp_uwsgi_options.enabled %}
+{% if 'enabled' in config['cwapp_uwsgi_options'].keys() %}
+ {% if config['cwapp_uwsgi_options']['enabled'] %}
 /etc/uwsgi/apps-enabled/{{ name }}.ini:
   file.symlink:
     - target: /etc/uwsgi/apps-available/{{ name }}.ini
@@ -34,10 +35,11 @@
       - file: /etc/uwsgi/apps-available/{{ name }}.ini
     - watch_in:
       - service: uwsgi
+  {% endif %}
 {% endif %}
 
-{% if 'file' in  config.cwapp_uwsgi_options.keys() %}
-{% if config.cwapp_uwsgi_options.file %}
+{% if 'file' in  config['cwapp_uwsgi_options'].keys() %}
+{% if config['cwapp_uwsgi_options']['file'] %}
 deploy wsgiapp.py for {{ name }}:
   file.managed:
     - name: {{ config.cwapp_uwsgi_options.file }}