updated telegraf state
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2024-03-20 14:56:04 +01:00
parent a80adde56e
commit fa60977155
3 changed files with 7 additions and 11 deletions

View File

@ -6,11 +6,9 @@ telegraf-config-dir:
- user: root
- group: root
- mode: 700
- watch_in:
- service: telegraf-service
{% for cfg, value in telegraf.config.items() %}
telegraf-config-file:
telegraf-config-{{ cfg }}-file:
file.managed:
- name: /etc/telegraf/{{ cfg }}.conf
- source: salt://telegraf/templates/telegraf.conf.j2

View File

@ -15,16 +15,12 @@ telegraf-archive-extract:
- skip_verify: true
- archive_format: tar
- if_missing: {{ telegraf.release_dir }}/telegraf-{{ telegraf.version }}/telegraf
- watch_in:
- service: telegraf-service
telegraf-bin-symlink:
file.symlink:
- name: /usr/local/bin/telegraf
- target: {{ telegraf.release_dir }}/telegraf-{{ telegraf.version }}/telegraf
- force: true
- watch_in:
- service: telegraf-service
telegraf-defaults-file:
file.managed:
@ -33,8 +29,6 @@ telegraf-defaults-file:
- user: root
- group: root
- template: jinja
- watch_in:
- service: telegraf-service
telegraf-cleanup:
software.cleanup:

View File

@ -7,12 +7,16 @@ telegraf-service-file:
- user: root
- group: root
- template: jinja
- watch_in:
- service: telegraf-service
{% for cfg, value in telegraf.config.items() %}
telegraf-{{ cfg }}-service:
service.running:
- name: telegraf@{{ cfg }}
- enable: true
- watch:
- archive: telegraf-archive-extract
- file: telegraf-service-file
- file: telegraf-bin-symlink
- file: telegraf-defaults-file
- file: telegraf-config-dir
{% endfor %}