Skip to content

Commit

Permalink
Fix def check and check for uchiwa user
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ragnar committed Feb 9, 2018
1 parent 9b16ef2 commit 5913aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/sensu-api.json.j2
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down
4 changes: 3 additions & 1 deletion templates/uchiwa_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -14,7 +14,9 @@
}
],
"uchiwa": {
{% if uchiwa_users %}
"users": {{ uchiwa_users | to_nice_json }},
{% endif %}
"port": {{ uchiwa_port }},
{% if uchiwa_auth_privatekey %}
"auth": {
Expand Down

0 comments on commit 5913aa2

Please sign in to comment.