[TIDY] Update to ansible 4 module names

This commit is contained in:
Jannik Beyerstedt 2021-08-28 16:50:37 +02:00
parent 3c1939f431
commit a2fc598416
19 changed files with 89 additions and 89 deletions

View file

@ -3,7 +3,7 @@
# Install
- name: telegraf - Install telegraf
include_tasks: "{{ item }}"
ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- "telegraf-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
- "telegraf-{{ ansible_distribution }}.yml"
@ -14,19 +14,19 @@
become: yes
block:
- name: SNMP - Download and install Ubiquiti MIB
copy:
ansible.builtin.copy:
src: "{{ role_path }}/files/UBNT-MIB.txt"
dest: /usr/share/snmp/mibs/UBNT-MIB
- name: SNMP - Download and install Ubiquiti MIB
copy:
ansible.builtin.copy:
src: "{{ role_path }}/files/UBNT-AirMAX-MIB.txt"
dest: /usr/share/snmp/mibs/UBNT-AirMAX-MIB
- name: SNMP - Download and install UniFi MIB
copy:
ansible.builtin.copy:
src: "{{ role_path }}/files/UBNT-UniFi-MIB.txt"
dest: /usr/share/snmp/mibs/UBNT-UniFi-MIB
- name: SNMP - Setup snmp.conf
lineinfile:
ansible.builtin.lineinfile:
name: /etc/snmp/snmp.conf
line: mibs +ALL
create: yes
@ -35,21 +35,21 @@
# Configure
- name: telegraf - Copy telegraf config (Linux)
become: yes
template:
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)
become: yes
template:
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
service:
ansible.builtin.service:
name: telegraf
state: restarted
enabled: yes