[TIDY] move when statements, fix whitespace
Having the when condition of a task at the top instead of bottom is easiert to read. Also some spaces were another whitespace character on accident.
This commit is contained in:
parent
1de4e4ef24
commit
a0ac0a67a7
13 changed files with 54 additions and 60 deletions
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
# Install SNMP MIBs
|
||||
- name: telegraf - Install SNMP MIBs
|
||||
when: telegraf_ubnt_ns_ips is defined
|
||||
become: yes
|
||||
block:
|
||||
- name: SNMP - Download and install Ubiquiti MIB
|
||||
|
|
@ -30,22 +31,21 @@
|
|||
name: /etc/snmp/snmp.conf
|
||||
line: mibs +ALL
|
||||
create: yes
|
||||
when: telegraf_ubnt_ns_ips is defined
|
||||
|
||||
# Configure
|
||||
- name: telegraf - Copy telegraf config (Linux)
|
||||
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "FreeBSD"
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/telegraf.conf.j2"
|
||||
dest: /etc/telegraf/telegraf.conf
|
||||
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "FreeBSD"
|
||||
|
||||
- name: telegraf - Copy telegraf config (FreeBSD)
|
||||
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "FreeBSD"
|
||||
become: yes
|
||||
ansible.builtin.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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue