Fix the remaining var-spacing ansible-lint errors
Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#var-spacing
This commit is contained in:
		| @@ -115,7 +115,7 @@ matrix_appservice_slack_registration_yaml: | | |||||||
|     - exclusive: false |     - exclusive: false | ||||||
|       regex: '#{{ matrix_appservice_slack_user_prefix }}.*' |       regex: '#{{ matrix_appservice_slack_user_prefix }}.*' | ||||||
|     rooms: [] |     rooms: [] | ||||||
|   url: "{{matrix_appservice_slack_appservice_url}}:{{ matrix_appservice_slack_matrix_port }}" |   url: "{{ matrix_appservice_slack_appservice_url }}:{{ matrix_appservice_slack_matrix_port }}" | ||||||
|   sender_localpart: slackbot |   sender_localpart: slackbot | ||||||
|   rate_limited: true |   rate_limited: true | ||||||
|   protocols: null |   protocols: null | ||||||
|   | |||||||
| @@ -23,6 +23,6 @@ | |||||||
|  |  | ||||||
| - name: Register user | - name: Register user | ||||||
|   ansible.builtin.command: |   ansible.builtin.command: | ||||||
|     cmd: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account {{ username|quote }} {{ password|quote }}" |     cmd: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account {{ username | quote }} {{ password | quote }}" | ||||||
|   register: matrix_dendrite_register_user_result |   register: matrix_dendrite_register_user_result | ||||||
|   changed_when: matrix_dendrite_register_user_result.rc == 0 |   changed_when: matrix_dendrite_register_user_result.rc == 0 | ||||||
|   | |||||||
| @@ -78,7 +78,7 @@ matrix_postgres_import_roles_to_ignore: [matrix_postgres_connection_username] | |||||||
| # which is unsupported by default by newer Postgres versions (v14+). | # which is unsupported by default by newer Postgres versions (v14+). | ||||||
| # When users are created and passwords are set by the playbook, they end up hashed as `scram-sha-256` on Postgres v14+. | # When users are created and passwords are set by the playbook, they end up hashed as `scram-sha-256` on Postgres v14+. | ||||||
| # If an md5-hashed password is restored on top, Postgres v14+ will refuse to authenticate users with it by default. | # If an md5-hashed password is restored on top, Postgres v14+ will refuse to authenticate users with it by default. | ||||||
| matrix_postgres_import_roles_ignore_regex: "^(CREATE|ALTER) ROLE ({{ matrix_postgres_import_roles_to_ignore | join('|') }})(;| WITH)" | matrix_postgres_import_roles_ignore_regex: "^(CREATE|ALTER) ROLE ({{ matrix_postgres_import_roles_to_ignore | join('|') }})(;| WITH)"  # noqa var-spacing | ||||||
|  |  | ||||||
| # A list of databases to avoid creating when importing (or upgrading) the database. | # A list of databases to avoid creating when importing (or upgrading) the database. | ||||||
| # If a dump file contains the databases and they've also been created beforehand (see `matrix_postgres_additional_databases`), | # If a dump file contains the databases and they've also been created beforehand (see `matrix_postgres_additional_databases`), | ||||||
| @@ -86,7 +86,7 @@ matrix_postgres_import_roles_ignore_regex: "^(CREATE|ALTER) ROLE ({{ matrix_post | |||||||
| # We either need to not create them or to ignore the `CREATE DATABASE` statements in the dump. | # We either need to not create them or to ignore the `CREATE DATABASE` statements in the dump. | ||||||
| matrix_postgres_import_databases_to_ignore: [matrix_postgres_db_name] | matrix_postgres_import_databases_to_ignore: [matrix_postgres_db_name] | ||||||
|  |  | ||||||
| matrix_postgres_import_databases_ignore_regex: "^CREATE DATABASE ({{ matrix_postgres_import_databases_to_ignore | join('|') }})\\s" | matrix_postgres_import_databases_ignore_regex: "^CREATE DATABASE ({{ matrix_postgres_import_databases_to_ignore | join('|') }})\\s"  # noqa var-spacing | ||||||
|  |  | ||||||
| # The number of seconds to wait after starting `matrix-postgres.service` | # The number of seconds to wait after starting `matrix-postgres.service` | ||||||
| # and before trying to run queries for creating additional databases/users against it. | # and before trying to run queries for creating additional databases/users against it. | ||||||
|   | |||||||
| @@ -84,6 +84,8 @@ | |||||||
|       grep -vE '{{ matrix_postgres_import_roles_ignore_regex }}' | |       grep -vE '{{ matrix_postgres_import_roles_ignore_regex }}' | | ||||||
|       grep -vE '{{ matrix_postgres_import_databases_ignore_regex }}' | |       grep -vE '{{ matrix_postgres_import_databases_ignore_regex }}' | | ||||||
|       psql -v ON_ERROR_STOP=1 -h matrix-postgres --dbname={{ postgres_default_import_database }}" |       psql -v ON_ERROR_STOP=1 -h matrix-postgres --dbname={{ postgres_default_import_database }}" | ||||||
|  |   tags: | ||||||
|  |     - skip_ansible_lint | ||||||
|  |  | ||||||
| # This is a hack. | # This is a hack. | ||||||
| # See: https://ansibledaily.com/print-to-standard-output-without-escaping/ | # See: https://ansibledaily.com/print-to-standard-output-without-escaping/ | ||||||
|   | |||||||
| @@ -93,6 +93,8 @@ | |||||||
|       > /out/{{ postgres_dump_name }}" |       > /out/{{ postgres_dump_name }}" | ||||||
|   register: matrix_postgres_upgrade_postgres_dump_command_result |   register: matrix_postgres_upgrade_postgres_dump_command_result | ||||||
|   changed_when: matrix_postgres_upgrade_postgres_dump_command_result.rc == 0 |   changed_when: matrix_postgres_upgrade_postgres_dump_command_result.rc == 0 | ||||||
|  |   tags: | ||||||
|  |     - skip_ansible_lint | ||||||
|  |  | ||||||
| - name: Ensure matrix-postgres is stopped | - name: Ensure matrix-postgres is stopped | ||||||
|   ansible.builtin.service: |   ansible.builtin.service: | ||||||
| @@ -144,6 +146,8 @@ | |||||||
|       grep -vE '{{ matrix_postgres_import_roles_ignore_regex }}' | |       grep -vE '{{ matrix_postgres_import_roles_ignore_regex }}' | | ||||||
|       grep -vE '{{ matrix_postgres_import_databases_ignore_regex }}' | |       grep -vE '{{ matrix_postgres_import_databases_ignore_regex }}' | | ||||||
|       psql -v ON_ERROR_STOP=1 -h matrix-postgres" |       psql -v ON_ERROR_STOP=1 -h matrix-postgres" | ||||||
|  |   tags: | ||||||
|  |     - skip_ansible_lint | ||||||
|  |  | ||||||
| # This is a hack. | # This is a hack. | ||||||
| # See: https://ansibledaily.com/print-to-standard-output-without-escaping/ | # See: https://ansibledaily.com/print-to-standard-output-without-escaping/ | ||||||
|   | |||||||
| @@ -31,4 +31,8 @@ matrix_synapse_workers_generic_worker_client_server_endpoints: "{{ matrix_synaps | |||||||
| # | # | ||||||
| # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492), | # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492), | ||||||
| # which takes a list of various strings and removes the ones NOT containing `/_matrix/federation` or `/_matrix/key` anywhere in them. | # which takes a list of various strings and removes the ones NOT containing `/_matrix/federation` or `/_matrix/key` anywhere in them. | ||||||
| matrix_synapse_workers_generic_worker_federation_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', '.*(/_matrix/federation|/_matrix/key).*') | list | difference([none]) }}" | matrix_synapse_workers_generic_worker_federation_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', matrix_synapse_workers_generic_worker_federation_endpoints_regex) | list | difference([none]) }}" | ||||||
|  |  | ||||||
|  | # matrix_synapse_workers_generic_worker_federation_endpoints_regex contains the regex used in matrix_synapse_workers_generic_worker_federation_endpoints. | ||||||
|  | # It's intentionally put in a separate variable, to avoid tripping ansible-lint's var-spacing rule. | ||||||
|  | matrix_synapse_workers_generic_worker_federation_endpoints_regex: '.*(/_matrix/federation|/_matrix/key).*' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user