yamllint : indentation, trailing-spaces and truthy value

This commit is contained in:
Jérémy Dubois 2020-10-12 15:26:45 +02:00
parent 337e80b670
commit 7cc374ea9e
2 changed files with 35 additions and 34 deletions

View File

@ -10,23 +10,23 @@ collectd_interval: "300"
# exec plugin
collectd_plugin_exec: False # Set to true only if one of the exec plugins below is also set to true
collectd_plugin_exec: false # Set to true only if one of the exec plugins below is also set to true
collectd_plugin_exec_interval: "{{ collectd_interval }}"
collectd_plugin_exec_ifq_drops: False
collectd_plugin_exec_dns_stats: False # Based on unbound
collectd_plugin_exec_ifq_drops: false
collectd_plugin_exec_dns_stats: false # Based on unbound
collectd_plugin_exec_dns_stats_interval: "{{ collectd_interval }}"
# others plugins
collectd_plugin_cpu: True
collectd_plugin_df: True
collectd_plugin_disk: True
collectd_plugin_interface: True
collectd_plugin_load: True
collectd_plugin_memory: True
collectd_plugin_pf: True
collectd_plugin_processes: True
collectd_plugin_swap: True
collectd_plugin_tcpconns: True
collectd_plugin_uptime: True
collectd_plugin_users: True
collectd_plugin_cpu: true
collectd_plugin_df: true
collectd_plugin_disk: true
collectd_plugin_interface: true
collectd_plugin_load: true
collectd_plugin_memory: true
collectd_plugin_pf: true
collectd_plugin_processes: true
collectd_plugin_swap: true
collectd_plugin_tcpconns: true
collectd_plugin_uptime: true
collectd_plugin_users: true

View File

@ -3,7 +3,7 @@
openbsd_pkg:
name: "collectd"
tags:
- collectd
- collectd
- name: Deploy Collectd configuration
template:
@ -11,14 +11,14 @@
dest: "/etc/collectd.conf"
notify: restart collectd
tags:
- collectd
- collectd
- name: Enabling Collectd
service:
name: collectd
enabled: yes
enabled: true
tags:
- collectd
- collectd
- name: Create scripts directory for exec plugins
file:
@ -26,17 +26,17 @@
state: directory
when: collectd_plugin_exec
tags:
- collectd
- collectd
- name: Copy ifq_drops.sh
copy:
src: ifq_drops.sh
dest: /usr/local/share/collectd/scripts/ifq_drops.sh
mode: 0755
force: yes
force: true
when: collectd_plugin_exec_ifq_drops
tags:
- collectd
- collectd
- name: Remove ifq_drops.sh
file:
@ -44,29 +44,30 @@
state: absent
when: not collectd_plugin_exec_ifq_drops
tags:
- collectd
- collectd
- name: Copy dns_stats.sh
copy:
copy:
src: dns_stats.sh
dest: /usr/local/share/collectd/scripts/dns_stats.sh
mode: 0755
force: yes
force: true
when: collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd
- name: Add stats DNS on unbound
lineinfile:
path: /var/unbound/etc/unbound.conf
regexp: 'statistics-interval'
line: ' statistics-interval: {{ collectd_plugin_exec_dns_stats_interval }}'
line:
' statistics-interval: {{ collectd_plugin_exec_dns_stats_interval }}'
insertafter: 'hide-version:'
backup: yes
backup: true
notify: reload unbound
when: collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd
- name: Remove dns_stats.sh
file:
@ -74,18 +75,18 @@
state: absent
when: not collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd
- name: Remove stats DNS on unbound
lineinfile:
path: /var/unbound/etc/unbound.conf
regexp: 'statistics-interval'
backup: yes
backup: true
state: absent
notify: reload unbound
when: not collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd
- name: Add doas configuration for dns_stats.sh execution
lineinfile:
@ -93,7 +94,7 @@
line: 'permit nopass _collectd as root cmd /bin/cat'
when: collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd
- name: Delete doas configuration for dns_stats.sh execution
lineinfile:
@ -102,4 +103,4 @@
state: absent
when: not collectd_plugin_exec_dns_stats
tags:
- collectd
- collectd