X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Finfluxdb.git;a=blobdiff_plain;f=influxdb%2Fserver.sls;h=30899fc28775e67db1e1f71244891bd329eb08af;hp=4276a8e86de5d663ba455e497c8a37854e110751;hb=1dd422969a205d0730d071fa8bbf6953ebeaff38;hpb=bbcaadcda30cab3358302e7fbde2e8fb3006f331 diff --git a/influxdb/server.sls b/influxdb/server.sls index 4276a8e..30899fc 100644 --- a/influxdb/server.sls +++ b/influxdb/server.sls @@ -1,15 +1,7 @@ {%- from "influxdb/map.jinja" import server with context %} -{% from "linux/map.jinja" import system with context %} {%- if server.enabled %} -linux_packages: - pkg.installed: - - pkgs: {{ system.pkgs }} - -include: - - linux.system.repo - influxdb_packages: pkg.installed: - names: {{ server.pkgs }} @@ -30,8 +22,6 @@ influxdb_default: - require: - pkg: influxdb_packages -{%- if not grains.get('noservices', False) %} - influxdb_service: service.running: - enable: true @@ -39,12 +29,13 @@ influxdb_service: # This delay is needed before being able to send data to server to create # users and databases. - init_delay: 5 + {%- if grains.get('noservices') %} + - onlyif: /bin/false + {%- endif %} - watch: - file: influxdb_config - file: influxdb_default -{%- endif %} - {% set url_for_query = "http://{}:{}/query".format(server.http.bind.address, server.http.bind.port) %} {% set admin_created = false %} @@ -54,10 +45,8 @@ influxdb_service: influxdb_create_admin: cmd.run: - name: curl -f -S -POST "{{ url_for_query }}" {{ query_create_admin }} || curl -f -S -POST "{{ admin_url }}" {{ query_create_admin }} - {%- if not grains.get('noservices', False) %} - require: - service: influxdb_service - {%- endif %} {% set url_for_query = admin_url %} {% set admin_created = true %} {%- endif %}