32 lines
679 B
YAML
32 lines
679 B
YAML
- name: Add influxdb repository
|
|
deb822_repository:
|
|
name: influxdata
|
|
uris: https://repos.influxdata.com/debian
|
|
suites: stable
|
|
components: main
|
|
architectures: amd64
|
|
signed_by: https://repos.influxdata.com/influxdata-archive.key
|
|
notify: update package cache
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Install telegraf
|
|
package:
|
|
name: telegraf
|
|
|
|
- name: Configure telegraf
|
|
when: not ansible_check_mode
|
|
template:
|
|
dest: /etc/telegraf/telegraf.d/output.conf
|
|
src: output.conf.j2
|
|
owner: telegraf
|
|
group: telegraf
|
|
mode: 0640
|
|
notify: restart telegraf
|
|
|
|
- name: Enable telegraf
|
|
service:
|
|
name: telegraf
|
|
enabled: true
|
|
state: started
|