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 # 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_interval: "{{ collectd_interval }}"
collectd_plugin_exec_ifq_drops: False collectd_plugin_exec_ifq_drops: false
collectd_plugin_exec_dns_stats: False # Based on unbound collectd_plugin_exec_dns_stats: false # Based on unbound
collectd_plugin_exec_dns_stats_interval: "{{ collectd_interval }}" collectd_plugin_exec_dns_stats_interval: "{{ collectd_interval }}"
# others plugins # others plugins
collectd_plugin_cpu: True collectd_plugin_cpu: true
collectd_plugin_df: True collectd_plugin_df: true
collectd_plugin_disk: True collectd_plugin_disk: true
collectd_plugin_interface: True collectd_plugin_interface: true
collectd_plugin_load: True collectd_plugin_load: true
collectd_plugin_memory: True collectd_plugin_memory: true
collectd_plugin_pf: True collectd_plugin_pf: true
collectd_plugin_processes: True collectd_plugin_processes: true
collectd_plugin_swap: True collectd_plugin_swap: true
collectd_plugin_tcpconns: True collectd_plugin_tcpconns: true
collectd_plugin_uptime: True collectd_plugin_uptime: true
collectd_plugin_users: True collectd_plugin_users: true

View file

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