From 7cc374ea9e2245698880467e1f11f6c80cc18758 Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Mon, 12 Oct 2020 15:26:45 +0200 Subject: [PATCH] yamllint : indentation, trailing-spaces and truthy value --- roles/collectd/defaults/main.yml | 30 ++++++++++++------------ roles/collectd/tasks/main.yml | 39 ++++++++++++++++---------------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/roles/collectd/defaults/main.yml b/roles/collectd/defaults/main.yml index 214234d..8460a72 100644 --- a/roles/collectd/defaults/main.yml +++ b/roles/collectd/defaults/main.yml @@ -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 diff --git a/roles/collectd/tasks/main.yml b/roles/collectd/tasks/main.yml index a678829..77a5988 100644 --- a/roles/collectd/tasks/main.yml +++ b/roles/collectd/tasks/main.yml @@ -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