From 9dff4138675c89fa0de23493f9637f5cc4ef333e Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Fri, 28 Nov 2025 20:37:39 +0300 Subject: [PATCH] Fix linting --- .yamllint.yml | 4 ++++ Taskfile.yml | 22 +++++++++++----------- files/authelia/configuration.template.yml | 15 ++++++++------- files/homepage/docker-compose.template.yml | 2 +- files/netdata/docker-compose.template.yml | 3 +-- files/outline/docker-compose.template.yml | 6 +++--- lefthook.yml | 4 ++-- playbook-homepage-registry.yml | 2 +- playbook-transcriber-registry.yml | 2 +- roles/eget/defaults/main.yml | 2 +- 10 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.yamllint.yml b/.yamllint.yml index 9119b52..974232d 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -1,5 +1,9 @@ extends: default +ignore: + - ".ansible/" + - "galaxy.roles/" + rules: # Правила, требуемые ansible-lint comments: diff --git a/Taskfile.yml b/Taskfile.yml index d5da8e2..00fabe7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,11 +21,11 @@ tasks: ssh: cmds: - - ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} + - ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} btop: cmds: - - ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} -t btop + - ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} -t btop encrypt: cmds: @@ -44,20 +44,20 @@ tasks: DEST_FILE: "temp/configuration.yml" cmds: - > - ansible localhost - --module-name template - --args "src=files/authelia/configuration.template.yml dest={{.DEST_FILE}}" + ansible localhost + --module-name template + --args "src=files/authelia/configuration.template.yml dest={{.DEST_FILE}}" --extra-vars "@vars/secrets.yml" --extra-vars "@files/authelia/secrets.yml" - defer: rm -f {{.DEST_FILE}} - > - {{.AUTHELIA_DOCKER}} - validate-config --config /data/{{.DEST_FILE}} + {{.AUTHELIA_DOCKER}} + validate-config --config /data/{{.DEST_FILE}} authelia-gen-random-string: summary: | - Generate random string. - Usage example: + Generate random string. + Usage example: task authelia-gen-random-string LEN=64 vars: LEN: '{{ .LEN | default 10 }}' @@ -76,5 +76,5 @@ tasks: format-py-files: cmds: - - >- - docker run --rm -u {{.USER_ID}}:{{.GROUP_ID}} -v $PWD:/app -w /app pyfound/black:latest_release black . + - >- + docker run --rm -u {{.USER_ID}}:{{.GROUP_ID}} -v $PWD:/app -w /app pyfound/black:latest_release black . diff --git a/files/authelia/configuration.template.yml b/files/authelia/configuration.template.yml index bb21507..74382c4 100644 --- a/files/authelia/configuration.template.yml +++ b/files/authelia/configuration.template.yml @@ -408,12 +408,12 @@ identity_validation: ## ## The available providers are: `file`, `ldap`. You must use only one of these providers. authentication_backend: - + ## Password Change Options. password_change: ## Disable both the HTML element and the API for password change functionality. disable: true - + ## Password Reset Options. password_reset: ## Disable both the HTML element and the API for reset password functionality. @@ -896,8 +896,8 @@ session: ## Important: Kubernetes (or HA) users must read https://www.authelia.com/t/statelessness ## redis: - host: 'authelia_redis' - port: 6379 + host: 'authelia_redis' + port: 6379 ## Use a unix socket instead # host: '/var/run/redis/redis.sock' @@ -1292,7 +1292,8 @@ identity_providers: ## configured has the RS256 algorithm. For RSA keys (RS or PS) the minimum is a 2048 bit key. jwks: - - ## Key ID embedded into the JWT header for key matching. Must be an alphanumeric string with 7 or less characters. + ## Key ID embedded into the JWT header for key matching. + ## Must be an alphanumeric string with 7 or less characters. ## This value is automatically generated if not provided. It's recommended to not configure this. # key_id: 'example' @@ -1383,7 +1384,7 @@ identity_providers: clients: - client_name: 'Miniflux' - client_id: '{{ oidc__miniflux__client_id }}' + client_id: '{{ oidc__miniflux__client_id }}' client_secret: '{{ oidc__miniflux__client_secret }}' redirect_uris: - 'https://miniflux.vakhrushev.me/oauth2/oidc/callback' @@ -1397,7 +1398,7 @@ identity_providers: - 'authorization_code' access_token_signed_response_alg: 'none' userinfo_signed_response_alg: 'none' - token_endpoint_auth_method: 'client_secret_basic' + token_endpoint_auth_method: 'client_secret_basic' - client_name: 'Wakapi' diff --git a/files/homepage/docker-compose.template.yml b/files/homepage/docker-compose.template.yml index d0ec31d..3b34f08 100644 --- a/files/homepage/docker-compose.template.yml +++ b/files/homepage/docker-compose.template.yml @@ -1,4 +1,5 @@ services: + homepage_app: # noinspection ComposeUnknownValues image: "{{ registry_homepage_nginx_image }}" @@ -10,4 +11,3 @@ services: networks: web_proxy_network: external: true - diff --git a/files/netdata/docker-compose.template.yml b/files/netdata/docker-compose.template.yml index beac2c4..597f160 100644 --- a/files/netdata/docker-compose.template.yml +++ b/files/netdata/docker-compose.template.yml @@ -1,4 +1,3 @@ - services: netdata: @@ -17,7 +16,7 @@ services: - "{{ config_dir }}:/etc/netdata" - "{{ (data_dir, 'lib') | path_join }}:/var/lib/netdata" - "{{ (data_dir, 'cache') | path_join }}:/var/cache/netdata" - # Netdata system volumes + # Netdata system volumes - "/:/host/root:ro,rslave" - "/etc/group:/host/etc/group:ro" - "/etc/localtime:/etc/localtime:ro" diff --git a/files/outline/docker-compose.template.yml b/files/outline/docker-compose.template.yml index d9555fe..6b668f5 100644 --- a/files/outline/docker-compose.template.yml +++ b/files/outline/docker-compose.template.yml @@ -20,9 +20,9 @@ services: FORCE_HTTPS: 'true' SECRET_KEY: '{{ outline_secret_key }}' UTILS_SECRET: '{{ outline_utils_secret }}' - DATABASE_URL: 'postgres://{{ outline_postgres_user }}:{{ outline_postgres_password }}@outline_postgres:5432/{{ outline_postgres_database }}' + DATABASE_URL: 'postgres://{{ outline_postgres_user }}:{{ outline_postgres_password }}@outline_postgres:5432/{{ outline_postgres_database }}' # yamllint disable-line rule:line-length PGSSLMODE: 'disable' - REDIS_URL: 'redis://outline_redis:6379' + REDIS_URL: 'redis://outline_redis:6379' FILE_STORAGE: 's3' FILE_STORAGE_UPLOAD_MAX_SIZE: '262144000' @@ -34,7 +34,7 @@ services: AWS_S3_UPLOAD_BUCKET_NAME: '{{ outline_s3_bucket }}' AWS_S3_FORCE_PATH_STYLE: 'true' AWS_S3_ACL: 'private' - + OIDC_CLIENT_ID: '{{ outline_oidc_client_id | replace("$", "$$") }}' OIDC_CLIENT_SECRET: '{{ outline_oidc_client_secret | replace("$", "$$") }}' OIDC_AUTH_URI: 'https://auth.vakhrushev.me/api/oidc/authorization' diff --git a/lefthook.yml b/lefthook.yml index 03f7942..a2aa863 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -6,9 +6,9 @@ templates: pre-commit: jobs: - + - name: "gitleaks" run: "gitleaks git --staged" - + - name: "check secret files" run: "python3 {av-hooks-dir}/pre-commit/check-secrets-encrypted-with-ansible-vault.py" diff --git a/playbook-homepage-registry.yml b/playbook-homepage-registry.yml index bcf6415..d5af45c 100644 --- a/playbook-homepage-registry.yml +++ b/playbook-homepage-registry.yml @@ -1,7 +1,7 @@ --- - name: "Upload local homepage images to registry" hosts: all - gather_facts: no + gather_facts: false vars_files: - vars/ports.yml diff --git a/playbook-transcriber-registry.yml b/playbook-transcriber-registry.yml index 968f4c1..d8ac5a1 100644 --- a/playbook-transcriber-registry.yml +++ b/playbook-transcriber-registry.yml @@ -1,7 +1,7 @@ --- - name: "Upload local transcriber images to registry" hosts: all - gather_facts: no + gather_facts: false vars_files: - vars/ports.yml diff --git a/roles/eget/defaults/main.yml b/roles/eget/defaults/main.yml index 920edb0..bf7f6b5 100644 --- a/roles/eget/defaults/main.yml +++ b/roles/eget/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for eget eget_version: "1.3.4" -eget_download_url: "https://github.com/zyedidia/eget/releases/download/v{{ eget_version }}/eget-{{ eget_version }}-linux_amd64.tar.gz" +eget_download_url: "https://github.com/zyedidia/eget/releases/download/v{{ eget_version }}/eget-{{ eget_version }}-linux_amd64.tar.gz" # yamllint disable-line rule:line-length eget_install_path: "/usr/bin/eget" eget_download_dest: '/tmp/{{ eget_download_url | split("/") | last }}'