More ansible-lint fixes

This commit is contained in:
Slavi Pantaleev
2022-07-18 11:22:05 +03:00
parent 34cdaade08
commit ddf18eadc7
337 changed files with 1720 additions and 1720 deletions

View File

@@ -6,14 +6,14 @@
ansible.builtin.fail:
msg: >-
The matrix-bridge-mautrix-googlechat role needs to execute before the matrix-synapse role.
when: "matrix_synapse_role_executed|default(False)"
when: "matrix_synapse_role_executed | default(False)"
- ansible.builtin.set_fact:
matrix_mautrix_googlechat_requires_restart: false
- block:
- name: Check if an SQLite database already exists
stat:
ansible.builtin.stat:
path: "{{ matrix_mautrix_googlechat_sqlite_database_path_local }}"
register: matrix_mautrix_googlechat_sqlite_database_path_local_stat_result
@@ -22,16 +22,16 @@
matrix_postgres_db_migration_request:
src: "{{ matrix_mautrix_googlechat_sqlite_database_path_local }}"
dst: "{{ matrix_mautrix_googlechat_database_connection_string }}"
caller: "{{ role_path|basename }}"
caller: "{{ role_path | basename }}"
engine_variable_name: 'matrix_mautrix_googlechat_database_engine'
engine_old: 'sqlite'
systemd_services_to_stop: ['matrix-mautrix-googlechat.service']
- import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
- ansible.builtin.import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
- ansible.builtin.set_fact:
matrix_mautrix_googlechat_requires_restart: true
when: "matrix_mautrix_googlechat_sqlite_database_path_local_stat_result.stat.exists|bool"
when: "matrix_mautrix_googlechat_sqlite_database_path_local_stat_result.stat.exists | bool"
when: "matrix_mautrix_googlechat_database_engine == 'postgres'"
- name: Ensure Mautrix googlechat image is pulled
@@ -58,7 +58,7 @@
- {path: "{{ matrix_mautrix_googlechat_config_path }}", when: true}
- {path: "{{ matrix_mautrix_googlechat_data_path }}", when: true}
- {path: "{{ matrix_mautrix_googlechat_docker_src_files_path }}", when: "{{ matrix_mautrix_googlechat_container_image_self_build }}"}
when: "item.when|bool"
when: "item.when | bool"
- name: Ensure Mautrix Hangots repository is present on self build
ansible.builtin.git:
@@ -68,7 +68,7 @@
become: true
become_user: "{{ matrix_user_username }}"
register: matrix_mautrix_googlechat_git_pull_results
when: "matrix_mautrix_googlechat_container_image_self_build|bool"
when: "matrix_mautrix_googlechat_container_image_self_build | bool"
- name: Ensure Mautrix googlechat Docker image is built
docker_image:
@@ -80,10 +80,10 @@
dockerfile: Dockerfile
path: "{{ matrix_mautrix_googlechat_docker_src_files_path }}"
pull: true
when: "matrix_mautrix_googlechat_container_image_self_build|bool"
when: "matrix_mautrix_googlechat_container_image_self_build | bool"
- name: Check if an old database file already exists
stat:
ansible.builtin.stat:
path: "{{ matrix_mautrix_googlechat_base_path }}/mautrix-googlechat.db"
register: matrix_mautrix_googlechat_stat_database
@@ -102,7 +102,7 @@
- name: Ensure mautrix-googlechat config.yaml installed
ansible.builtin.copy:
content: "{{ matrix_mautrix_googlechat_configuration|to_nice_yaml(indent=2, width=999999) }}"
content: "{{ matrix_mautrix_googlechat_configuration | to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_mautrix_googlechat_config_path }}/config.yaml"
mode: 0644
owner: "{{ matrix_user_username }}"
@@ -110,7 +110,7 @@
- name: Ensure mautrix-googlechat registration.yaml installed
ansible.builtin.copy:
content: "{{ matrix_mautrix_googlechat_registration|to_nice_yaml(indent=2, width=999999) }}"
content: "{{ matrix_mautrix_googlechat_registration | to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_mautrix_googlechat_config_path }}/registration.yaml"
mode: 0644
owner: "{{ matrix_user_username }}"
@@ -132,4 +132,4 @@
ansible.builtin.service:
name: "matrix-mautrix-googlechat.service"
state: restarted
when: "matrix_mautrix_googlechat_requires_restart|bool"
when: "matrix_mautrix_googlechat_requires_restart | bool"