Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ that minor version. You can set ``influxdb:no_conf_defaults`` in your pillar if
you want to completely specify the configuration yourself, without falling back
to defaults.

``influxdb.repo``
^^^^^^^^^^^^^^^^^^^^
Enable the official InfluxData package repository in order to always
benefit from the latest version. This state currently only works on Debian and RHEL.

``influxdb.repo.absent``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Undo the effects of ``influxdb.repo``.


Testing
-------

Expand Down
6 changes: 6 additions & 0 deletions influxdb/repo/absent.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% set name = {
'RedHat': 'redhat',
'Debian': 'debian',
}.get(grains.os_family) %}
include:
- .{{ name }}.absent
5 changes: 5 additions & 0 deletions influxdb/repo/debian/absent.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
drop-influxdata-repo:
pkgrepo.absent:
- name: deb http://debian.saltstack.com/debian {{ grains['oscodename'] }} stable
- file: /etc/apt/sources.list.d/influxdata.list
- key_url: https://repos.influxdata.com/influxdb.key
2 changes: 2 additions & 0 deletions influxdb/repo/debian/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- .present
5 changes: 5 additions & 0 deletions influxdb/repo/debian/present.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
influxdata-repo:
pkgrepo.managed:
- name: deb http://debian.saltstack.com/debian {{ grains['oscodename'] }} stable
- file: /etc/apt/sources.list.d/influxdata.list
- key_url: https://repos.influxdata.com/influxdb.key
6 changes: 6 additions & 0 deletions influxdb/repo/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% set name = {
'RedHat': 'redhat',
'Debian': 'debian',
}.get(grains.os_family) %}
include:
- .{{ name }}
3 changes: 3 additions & 0 deletions influxdb/repo/redhat/absent.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
drop-influxdata-repo:
pkgrepo.absent:
- name: influxdata
2 changes: 2 additions & 0 deletions influxdb/repo/redhat/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- .present
8 changes: 8 additions & 0 deletions influxdb/repo/redhat/present.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
influxdata-repo:
pkgrepo.managed:
- name: influxdata
- humanname: InfluxData Repository - Stable
- baseurl: https://repos.influxdata.com/stable/$basearch/main
- enabled: 1
- gpgcheck: 1
- gpgkey: https://repos.influxdata.com/influxdata-archive_compat.key