Skip to content

Commit

Permalink
fix(map.jinja): fix salt-lint errors
Browse files Browse the repository at this point in the history
```bash
Examining influxdb/map.jinja of type state
[209] Jinja comment should have spaces before and after: {# comment #}
influxdb/map.jinja:4
{##

[209] Jinja comment should have spaces before and after: {# comment #}
influxdb/map.jinja:18
{##

[209] Jinja comment should have spaces before and after: {# comment #}
influxdb/map.jinja:34
{## Merge the os_family_map into default settings ##}
```
  • Loading branch information
myii committed Oct 9, 2019
1 parent 0256d3c commit d7b9682
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions influxdb/map.jinja
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% import_yaml "influxdb/defaults.yaml" as defaults %}
{% import_yaml "influxdb/config_defaults.yaml" as config_defaults %}

{##
{#-
Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml
##}
#}

{% set os_family_map = salt['grains.filter_by']({
'Debian': {},
Expand All @@ -15,23 +15,23 @@ that differ from whats in defaults.yaml
merge=salt['pillar.get']('influxdb:lookup'))
%}

{##
{#-
Use configuration defaults appropriate for the version of InfluxDB that is being
installed unless the user explicitly requested to not use any default values in
which case normal pillar merging behaviour will be used.
The formula supports different configuration file formats for each MAJOR.MINOR
version of InfluxDB and will provide the configuration that ships with the
latest release off that branch.
##}
#}

{% if not salt['pillar.get']('influxdb:no_conf_defaults', False) %}
{% set influxdb_version = salt['pillar.get']('influxdb:version') %}
{% set major, minor = influxdb_version.split('.')[:2] %}
{% do defaults.influxdb.conf.update(config_defaults.get(major).get(minor)) %}
{% endif %}

{## Merge the os_family_map into default settings ##}
{#- Merge the os_family_map into default settings #}
{% do defaults.influxdb.update(os_family_map) %}

{# Update settings defaults from pillar data #}
Expand Down

0 comments on commit d7b9682

Please sign in to comment.