From 8d6a6fd0030b6079b0d2f892fdecabacaf01ad4c Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Mon, 7 Oct 2024 18:04:06 +0200 Subject: [PATCH] Fix ansible-lint offenses --- roles/element_web/templates/vhost.j2 | 2 +- roles/ethercalc/templates/vhost.j2 | 2 +- roles/hedgedoc/tasks/nginx.yml | 2 +- roles/hedgedoc/templates/vhost.j2 | 2 +- roles/mongodb/tasks/setup.yml | 2 +- roles/postfix/templates/postfix/main.cf.j2 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/element_web/templates/vhost.j2 b/roles/element_web/templates/vhost.j2 index 5f7dc86..50a1220 100644 --- a/roles/element_web/templates/vhost.j2 +++ b/roles/element_web/templates/vhost.j2 @@ -15,7 +15,7 @@ server { # Make sure to set Content-Security-Policy when this is not aleady done with the default headers. add_header Content-Security-Policy "frame-ancestors 'none'"; - {% if element_web_vhost_users|length > 0 -%} + {% if element_web_vhost_users | length > 0 -%} # access protection auth_basic "Restricted access only"; auth_basic_user_file /etc/nginx/.htpasswd_element_web; diff --git a/roles/ethercalc/templates/vhost.j2 b/roles/ethercalc/templates/vhost.j2 index 11084b5..5008431 100644 --- a/roles/ethercalc/templates/vhost.j2 +++ b/roles/ethercalc/templates/vhost.j2 @@ -26,7 +26,7 @@ server { proxy_set_header Connection $connection_upgrade; } - {% if ethercalc_vhost_users|length > 0 -%} + {% if ethercalc_vhost_users | length > 0 -%} # access protection auth_basic "Restricted access only"; auth_basic_user_file /etc/nginx/.htpasswd_ethercalc; diff --git a/roles/hedgedoc/tasks/nginx.yml b/roles/hedgedoc/tasks/nginx.yml index 307bde4..cddb6ed 100644 --- a/roles/hedgedoc/tasks/nginx.yml +++ b/roles/hedgedoc/tasks/nginx.yml @@ -19,7 +19,7 @@ ansible.builtin.file: path: /etc/nginx/.htpasswd_hedgedoc state: absent - when: hedgedoc_vhost_users|length < 1 + when: hedgedoc_vhost_users | length < 1 notify: Restart nginx - name: Enable block diff --git a/roles/hedgedoc/templates/vhost.j2 b/roles/hedgedoc/templates/vhost.j2 index 7606462..c352463 100644 --- a/roles/hedgedoc/templates/vhost.j2 +++ b/roles/hedgedoc/templates/vhost.j2 @@ -34,7 +34,7 @@ server { proxy_set_header Connection $connection_upgrade; } - {% if hedgedoc_vhost_users|length > 0 -%} + {% if hedgedoc_vhost_users | length > 0 -%} # access protection auth_basic "Restricted access only"; auth_basic_user_file /etc/nginx/.htpasswd_hedgedoc; diff --git a/roles/mongodb/tasks/setup.yml b/roles/mongodb/tasks/setup.yml index 7a1d456..3719a41 100644 --- a/roles/mongodb/tasks/setup.yml +++ b/roles/mongodb/tasks/setup.yml @@ -4,7 +4,7 @@ ansible.builtin.fail: msg: 'Set mongodb_net_ssl_mode is preferSSL or set valid hostname for mongodb_net_ssl_host!' when: ( mongodb_net_ssl_mode == 'requireSSL' - and mongodb_net_ssl_host|length == 0 ) + and mongodb_net_ssl_host | length == 0 ) - name: Check value of variable mongodb_login_host ansible.builtin.fail: diff --git a/roles/postfix/templates/postfix/main.cf.j2 b/roles/postfix/templates/postfix/main.cf.j2 index 92aec73..089f386 100644 --- a/roles/postfix/templates/postfix/main.cf.j2 +++ b/roles/postfix/templates/postfix/main.cf.j2 @@ -69,7 +69,7 @@ smtp_use_tls = yes recipient_canonical_maps = regexp:/etc/postfix/recipient-canonical {% endif -%} -{% if postfix_sender_canonicals|length > 0 -%} +{% if postfix_sender_canonicals | length > 0 -%} sender_canonical_maps = hash:/etc/postfix/sender-canonical {% endif -%} smtpd_relay_restrictions = {{ postfix_relay_restrictions }}