Add FreeBSD support

This commit is contained in:
Jannik Beyerstedt 2021-05-02 18:19:11 +02:00
parent 39045ed5a0
commit 22dd9bfb3d
6 changed files with 60 additions and 21 deletions

View file

@ -33,10 +33,23 @@
when: telegraf_ubnt_ns_ips is defined
# Configure
- name: telegraf - Copy telegraf config
- name: telegraf - Copy telegraf config (Linux)
become: yes
template:
src: "{{ role_path }}/templates/telegraf.conf.j2"
dest: /etc/telegraf/telegraf.conf
notify:
- Enable and restart telegraf
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "FreeBSD"
- name: telegraf - Copy telegraf config (FreeBSD)
become: yes
template:
src: "{{ role_path }}/templates/telegraf.conf.j2"
dest: /usr/local/etc/telegraf.conf
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "FreeBSD"
- name: telegraf - Enable and restart telegraf
become: yes
service:
name: telegraf
state: restarted
enabled: yes