diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
commit | 95b73daa36b23565a8566f71f9b202d3459b685f (patch) | |
tree | cb17b021be70e7868d0ec235a761f0ecdc80f3f2 /roles/services/monitoring/influxdb |
Diffstat (limited to 'roles/services/monitoring/influxdb')
-rw-r--r-- | roles/services/monitoring/influxdb/defaults/main.yml | 6 | ||||
-rw-r--r-- | roles/services/monitoring/influxdb/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/services/monitoring/influxdb/tasks/main.yml | 19 |
3 files changed, 29 insertions, 0 deletions
diff --git a/roles/services/monitoring/influxdb/defaults/main.yml b/roles/services/monitoring/influxdb/defaults/main.yml new file mode 100644 index 0000000..180ad8e --- /dev/null +++ b/roles/services/monitoring/influxdb/defaults/main.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | influxdb_packages: | ||
2 | - influxdb | ||
3 | - influxdb-client | ||
4 | |||
5 | influx_config: files/influxdb.conf | ||
6 | influx_data: files/influx_data/ | ||
diff --git a/roles/services/monitoring/influxdb/handlers/main.yml b/roles/services/monitoring/influxdb/handlers/main.yml new file mode 100644 index 0000000..765a040 --- /dev/null +++ b/roles/services/monitoring/influxdb/handlers/main.yml | |||
@@ -0,0 +1,4 @@ | |||
1 | - name: restart influxdb | ||
2 | service: | ||
3 | name: influxdb | ||
4 | state: restarted | ||
diff --git a/roles/services/monitoring/influxdb/tasks/main.yml b/roles/services/monitoring/influxdb/tasks/main.yml new file mode 100644 index 0000000..06d6e86 --- /dev/null +++ b/roles/services/monitoring/influxdb/tasks/main.yml | |||
@@ -0,0 +1,19 @@ | |||
1 | - name: install packages | ||
2 | package: | ||
3 | name: "{{ influxdb_packages }}" | ||
4 | state: latest | ||
5 | |||
6 | - name: copy config | ||
7 | notify: restart influxdb | ||
8 | copy: | ||
9 | src: "{{ influx_config }}" | ||
10 | dest: /etc/influxdb/influxdb.conf | ||
11 | owner: root | ||
12 | group: root | ||
13 | mode: '0644' | ||
14 | |||
15 | - name: enable influxdb | ||
16 | systemd: | ||
17 | name: influxdb | ||
18 | enabled: yes | ||
19 | masked: no | ||