s/false/False where it is needed
diff --git a/influxdb/files/influxdb.conf b/influxdb/files/influxdb.conf
index 6cc6d02..c992b86 100644
--- a/influxdb/files/influxdb.conf
+++ b/influxdb/files/influxdb.conf
@@ -187,7 +187,7 @@
[http]
enabled = true
bind-address = "{{ server.http.bind.address }}:{{ server.http.bind.port }}"
- {%- if server.admin.get('user', {}).get('enabled', false) %}
+ {%- if server.admin.get('user', {}).get('enabled', False) %}
auth-enabled = true
{%- else %}
auth-enabled = false
diff --git a/influxdb/server.sls b/influxdb/server.sls
index c0f0ea6..12be638 100644
--- a/influxdb/server.sls
+++ b/influxdb/server.sls
@@ -35,7 +35,7 @@
{% set url_for_query = "http://{}:{}/query".format(server.http.bind.address, server.http.bind.port) %}
{% set admin_created = false %}
-{%- if server.admin.get('user', {}).get('enabled', false) %}
+{%- if server.admin.get('user', {}).get('enabled', False) %}
{% set query_create_admin = "--data-urlencode \"q=CREATE USER {} WITH PASSWORD '{}' WITH ALL PRIVILEGES\"".format(server.admin.user.name, server.admin.user.password) %}
{% set admin_url = "http://{}:{}/query?u={}&p={}".format(server.http.bind.address, server.http.bind.port, server.admin.user.name, server.admin.user.password) %}
influxdb_create_admin:
@@ -50,8 +50,8 @@
# An admin must exist before creating others users
{%- if admin_created %}
{%- for user_name, user in server.get('user', {}).iteritems() %}
- {%- if user.get('enabled', false) %}
- {%- if user.get('admin', false) %}
+ {%- if user.get('enabled', False) %}
+ {%- if user.get('admin', False) %}
{% set query_create_user = "--data-urlencode \"q=CREATE USER {} WITH PASSWORD '{}' WITH ALL PRIVILEGES\"".format(user.name, user.password) %}
{%- else %}
{% set query_create_user = "--data-urlencode \"q=CREATE USER {} WITH PASSWORD '{}'\"".format(user.name, user.password) %}
@@ -67,7 +67,7 @@
{%- endif %}
{%- for db_name, db in server.get('database', {}).iteritems() %}
- {%- if db.get('enabled', false) %}
+ {%- if db.get('enabled', False) %}
{% set query_create_db = "--data-urlencode \"q=CREATE DATABASE {}\"".format(db.name) %}
influxdb_create_db_{{db.name}}:
cmd.run:
@@ -83,7 +83,7 @@
# An admin must exist to manage grants, otherwise there is no user.
{%- if admin_created %}
{%- for grant_name, grant in server.get('grant', {}).iteritems() %}
- {%- if grant.get('enabled', false) %}
+ {%- if grant.get('enabled', False) %}
{% set query_grant_user_access = "--data-urlencode \"q=GRANT {} ON {} TO {}\"".format(grant.privilege, grant.database, grant.user) %}
influxdb_grant_{{grant_name}}:
cmd.run: