From 31fa9fe67adfc1353ef949f1fa2513256723729b Mon Sep 17 00:00:00 2001 From: Adama DIENG Date: Tue, 24 May 2022 11:55:48 +0200 Subject: [PATCH] fix(pre-commit): run end-of-file-fixer & trailing-whitespace [skip ci] * https://gitlab.com/myii/collectd-formula/-/jobs/2492752465 -- before * https://gitlab.com/myii/collectd-formula/-/jobs/2498876164 -- after --- collectd/files/postgresql.conf | 22 +++++++++++----------- collectd/map.jinja | 2 +- collectd/openldap.sls | 1 - collectd/openvpn.sls | 1 - collectd/postgresql.sls | 3 ++- collectd/rabbitmq.sls | 1 - collectd/redis.sls | 1 - collectd/tcpconns.sls | 1 - collectd/zookeeper.conf | 1 - 9 files changed, 14 insertions(+), 19 deletions(-) diff --git a/collectd/files/postgresql.conf b/collectd/files/postgresql.conf index f2a5a83d..210f6690 100644 --- a/collectd/files/postgresql.conf +++ b/collectd/files/postgresql.conf @@ -13,52 +13,52 @@ LoadPlugin postgresql {%- if query.statement is defined and query.statement %} Statement "{{ query.statement }}" - {%- endif %} + {%- endif %} {%- if query.param is defined and query.param %} Param "{{ query.param }}" {%- endif %} - {%- for result in query.results %} + {%- for result in query.results %} {%- if result.type is defined and result.type %} Type {{ result.type }} {%- endif %} {%- if result.instanceprefix is defined and result.instanceprefix %} InstancePrefix "{{ result.instanceprefix }}" - {%- endif %} + {%- endif %} {%- if result.instancesfrom is defined and result.instancesfrom %} InstancesFrom "{{ result.instancesfrom }}" - {%- endif %} + {%- endif %} {%- if result.valuesfrom is defined and result.valuesfrom %} ValuesFrom "{{ result.valuesfrom }}" {%- endif %} {%- endfor %} - + {%- endfor %} {%- for db in collectd_settings.plugins.postgresql.databases %} {%- if db.host is defined and db.host %} Host "{{ db.host }}" - {%- endif %} + {%- endif %} {%- if db.port is defined and db.port %} Port "{{ db.port }}" - {%- endif %} + {%- endif %} {%- if db.user is defined and db.user %} User "{{ db.user }}" - {%- endif %} + {%- endif %} {%- if db.pass is defined and db.pass %} Password "{{ db.pass }}" - {%- endif %} + {%- endif %} {%- if db.sslmode is defined and db.sslmode %} SSLMode "{{ db.sslmode }}" - {%- endif %} + {%- endif %} {%- if db.krbsrvname is defined and db.krbsrvname %} KRBSrvName "{{ db.krbsrvname }}" {%- endif %} {%- if db.service is defined and db.service %} Service "{{ db.service }}" - {%- endif %} + {%- endif %} {%- if db.interval is defined and db.interval %} Interval "{{ db.interval }}" {%- endif %} diff --git a/collectd/map.jinja b/collectd/map.jinja index de06033b..9eb9fae6 100644 --- a/collectd/map.jinja +++ b/collectd/map.jinja @@ -251,4 +251,4 @@ {% do default_settings.collectd.update(os_map) %} {# Update settings defaults from pillar data #} -{% set collectd_settings = salt['pillar.get']('collectd', default=default_settings.collectd, merge=True) %} \ No newline at end of file +{% set collectd_settings = salt['pillar.get']('collectd', default=default_settings.collectd, merge=True) %} diff --git a/collectd/openldap.sls b/collectd/openldap.sls index 38021275..c5c0a341 100644 --- a/collectd/openldap.sls +++ b/collectd/openldap.sls @@ -12,4 +12,3 @@ include: - template: jinja - watch_in: - service: collectd-service - diff --git a/collectd/openvpn.sls b/collectd/openvpn.sls index 3d77f9b4..0964ee70 100644 --- a/collectd/openvpn.sls +++ b/collectd/openvpn.sls @@ -12,4 +12,3 @@ include: - template: jinja - watch_in: - service: collectd-service - diff --git a/collectd/postgresql.sls b/collectd/postgresql.sls index 1e3a455a..ab27e358 100644 --- a/collectd/postgresql.sls +++ b/collectd/postgresql.sls @@ -4,6 +4,7 @@ include: - collectd +# Install the required dependency package corresponding to the OS collectd-postgresql-pkg-installed: pkg.installed: - name: {{ collectd_settings.plugin_postgresql.pkg }} @@ -18,4 +19,4 @@ collectd-postgresql-pkg-installed: - watch_in: - service: collectd-service - require: - - pkg: collectd-postgresql-pkg-installed \ No newline at end of file + - pkg: collectd-postgresql-pkg-installed diff --git a/collectd/rabbitmq.sls b/collectd/rabbitmq.sls index ca12f88e..6df01b83 100644 --- a/collectd/rabbitmq.sls +++ b/collectd/rabbitmq.sls @@ -20,4 +20,3 @@ collectd-rabbitmq-module: - template: jinja - watch_in: - service: collectd-service - diff --git a/collectd/redis.sls b/collectd/redis.sls index 381c1772..2c4ca220 100644 --- a/collectd/redis.sls +++ b/collectd/redis.sls @@ -15,4 +15,3 @@ libhiredis0.13: - template: jinja - watch_in: - service: collectd-service - diff --git a/collectd/tcpconns.sls b/collectd/tcpconns.sls index 4b62773a..d7582b56 100644 --- a/collectd/tcpconns.sls +++ b/collectd/tcpconns.sls @@ -12,4 +12,3 @@ include: - template: jinja - watch_in: - service: collectd-service - diff --git a/collectd/zookeeper.conf b/collectd/zookeeper.conf index c0f683b2..bf26ba7b 100644 --- a/collectd/zookeeper.conf +++ b/collectd/zookeeper.conf @@ -12,4 +12,3 @@ include: - template: jinja - watch_in: - service: collectd-service -