Procházet zdrojové kódy

Fix def check and check for uchiwa user

Dan Ragnar před 7 roky
rodič
revize
5913aa2d34
2 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 1 1
      templates/sensu-api.json.j2
  2. 3 1
      templates/uchiwa_config.json.j2

+ 1 - 1
templates/sensu-api.json.j2

@@ -1,6 +1,6 @@
 {
   "api": {
-    {% if sensu_api_user_name | length > 0 %}
+    {% if sensu_api_user_name %}
     "user": "{{ sensu_api_user_name }}",
     "password": "{{ sensu_api_password }}",
     {% endif %}

+ 3 - 1
templates/uchiwa_config.json.j2

@@ -5,7 +5,7 @@
        "host": "{{ sensu_api_host }}",
        "ssl": {{ sensu_api_ssl | lower }},
        "port": {{ uchiwa_sensu_api_port }},
-       {% if sensu_api_user_name | length > 0 %}
+       {% if sensu_api_user_name %}
        "user": "{{ sensu_api_user_name }}",
        "pass": "{{ sensu_api_password }}",
        {% endif %}
@@ -14,7 +14,9 @@
    }
  ],
  "uchiwa": {
+   {% if uchiwa_users %}
    "users": {{ uchiwa_users | to_nice_json }},
+   {% endif %}
    "port": {{ uchiwa_port }},
    {% if uchiwa_auth_privatekey %}
    "auth": {