Fix some ansible-lint-reported warnings
This mostly fixes `key-order` warnings around `block` statements.
This commit is contained in:
@ -27,7 +27,10 @@
|
||||
}}
|
||||
when: matrix_mautrix_facebook_enabled | bool
|
||||
|
||||
- block:
|
||||
- when: matrix_mautrix_facebook_enabled | bool and matrix_mautrix_facebook_appservice_public_enabled | bool
|
||||
tags:
|
||||
- always
|
||||
block:
|
||||
- name: Fail if matrix-nginx-proxy role already executed
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
@ -70,7 +73,3 @@
|
||||
URL endpoint to the matrix-mautrix-facebook container.
|
||||
You can expose the container's port using the `matrix_mautrix_facebook_container_http_host_bind_port` variable.
|
||||
when: "not matrix_nginx_proxy_enabled | default(False) | bool"
|
||||
|
||||
tags:
|
||||
- always
|
||||
when: matrix_mautrix_facebook_enabled | bool and matrix_mautrix_facebook_appservice_public_enabled | bool
|
||||
|
@ -11,13 +11,15 @@
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_mautrix_facebook_requires_restart: false
|
||||
|
||||
- block:
|
||||
- when: "matrix_mautrix_facebook_database_engine == 'postgres'"
|
||||
block:
|
||||
- name: Check if an SQLite database already exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_mautrix_facebook_sqlite_database_path_local }}"
|
||||
register: matrix_mautrix_facebook_sqlite_database_path_local_stat_result
|
||||
|
||||
- block:
|
||||
- when: "matrix_mautrix_facebook_sqlite_database_path_local_stat_result.stat.exists | bool"
|
||||
block:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_postgres_db_migration_request:
|
||||
src: "{{ matrix_mautrix_facebook_sqlite_database_path_local }}"
|
||||
@ -33,8 +35,6 @@
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_mautrix_facebook_requires_restart: true
|
||||
when: "matrix_mautrix_facebook_sqlite_database_path_local_stat_result.stat.exists | bool"
|
||||
when: "matrix_mautrix_facebook_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure Mautrix Facebook image is pulled
|
||||
docker_image:
|
||||
|
@ -10,7 +10,8 @@
|
||||
- "matrix_mautrix_facebook_appservice_token"
|
||||
- "matrix_mautrix_facebook_homeserver_token"
|
||||
|
||||
- block:
|
||||
- when: "matrix_mautrix_facebook_database_engine == 'sqlite' and matrix_mautrix_facebook_docker_image.endswith(':da1b4ec596e334325a1589e70829dea46e73064b')"
|
||||
block:
|
||||
- name: Inject warning if on an old SQLite-supporting version
|
||||
ansible.builtin.set_fact:
|
||||
matrix_playbook_runtime_results: |
|
||||
@ -21,4 +22,3 @@
|
||||
"NOTE: Your mautrix-facebook bridge is still on SQLite and on the last version that supported it, before support was dropped. Support has been subsequently re-added in v0.3.2, so we advise you to upgrade (by removing your `matrix_mautrix_facebook_docker_image` definition from vars.yml)"
|
||||
]
|
||||
}}
|
||||
when: "matrix_mautrix_facebook_database_engine == 'sqlite' and matrix_mautrix_facebook_docker_image.endswith(':da1b4ec596e334325a1589e70829dea46e73064b')"
|
||||
|
Reference in New Issue
Block a user