diff --git a/influxdb/defaults.yaml b/influxdb/defaults.yaml index 7ecde1b..805469d 100644 --- a/influxdb/defaults.yaml +++ b/influxdb/defaults.yaml @@ -13,6 +13,7 @@ influxdb: system_group: 'influxdb' system_user: 'influxdb' toml_module: toml + use_wget_on_install: True tmpl: config: 'salt://influxdb/files/influxdb.config.jinja' etc_default: 'salt://influxdb/files/influxdb.etc_default' diff --git a/influxdb/init.sls b/influxdb/init.sls index 9c3bdd9..56b17ef 100644 --- a/influxdb/init.sls +++ b/influxdb/init.sls @@ -28,6 +28,7 @@ {% endif %} {% endif %} +{% if influxdb_settings['use_wget_on_install'] == True %} influxdb_package: cmd.run: - name: wget -qO /tmp/{{ filename }} {{ base_url }}/{{ filename }} @@ -39,6 +40,7 @@ influxdb_remove_broken_download: - onfail: - cmd: influxdb_package + influxdb_install: pkg.installed: - sources: @@ -47,6 +49,15 @@ influxdb_install: - cmd: influxdb_package - watch: - cmd: influxdb_package +{% else %} + + +influxdb_install: + pkg.installed: + - sources: + - influxdb: {{ base_url }}/{{ filename }} + +{% endif %} influxdb_group: group.present: diff --git a/pillar.example b/pillar.example index 820bbd7..7c8297b 100644 --- a/pillar.example +++ b/pillar.example @@ -1,6 +1,7 @@ influxdb: version: 0.12.0-1 no_conf_defaults: false + use_wget_on_install: True logging: directory: '/var/log/influxdb' file: 'influxd.log'