Use fully-qualified module names for builtin Ansible modules
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1939
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
---
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dimension.service'] }}"
|
||||
when: matrix_dimension_enabled|bool
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_dimension_requires_restart: false
|
||||
|
||||
- block:
|
||||
@ -12,10 +12,10 @@
|
||||
- block:
|
||||
# pgloader makes a few columns `smallint`, instead of `boolean`.
|
||||
# We need to fix them up.
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_dimension_pgloader_additional_psql_statements_list: []
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_dimension_pgloader_additional_psql_statements_list: |
|
||||
{{
|
||||
matrix_dimension_pgloader_additional_psql_statements_list
|
||||
@ -49,7 +49,7 @@
|
||||
- {'table': 'dimension_bridges', 'column': 'isEnabled', 'default': ''}
|
||||
- {'table': 'dimension_bridges', 'column': 'isPublic', 'default': ''}
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_postgres_db_migration_request:
|
||||
src: "{{ matrix_dimension_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_dimension_database_connection_string }}"
|
||||
@ -63,13 +63,13 @@
|
||||
|
||||
- import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_dimension_requires_restart: true
|
||||
when: "matrix_dimension_sqlite_database_path_local_stat_result.stat.exists|bool"
|
||||
when: "matrix_dimension_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure Dimension base path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_dimension_base_path }}"
|
||||
state: directory
|
||||
mode: 0770
|
||||
@ -77,7 +77,7 @@
|
||||
group: "{{ matrix_dimension_user_gid }}"
|
||||
|
||||
- name: Ensure Dimension config installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_dimension_configuration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_dimension_base_path }}/config.yaml"
|
||||
mode: 0640
|
||||
@ -97,7 +97,7 @@
|
||||
until: matrix_dimension_pull_results is not failed
|
||||
|
||||
- name: Ensure dimension repository is present on self-build
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_dimension_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_dimension_docker_src_files_path }}"
|
||||
version: "{{ matrix_dimension_container_image_self_build_branch }}"
|
||||
@ -120,19 +120,19 @@
|
||||
when: "matrix_dimension_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-dimension.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-dimension.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-dimension.service"
|
||||
mode: 0644
|
||||
register: matrix_dimension_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-dimension.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_dimension_systemd_service_result.changed|bool"
|
||||
|
||||
- name: Ensure matrix-dimension.service restarted, if necessary
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "matrix-dimension.service"
|
||||
state: restarted
|
||||
when: "matrix_dimension_requires_restart|bool"
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_dimension_service_stat
|
||||
|
||||
- name: Ensure matrix-dimension is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-dimension
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -15,18 +15,18 @@
|
||||
when: "matrix_dimension_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure matrix-dimension.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-dimension.service"
|
||||
state: absent
|
||||
when: "matrix_dimension_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-dimension.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_dimension_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure Dimension base directory doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_dimension_base_path }}"
|
||||
state: absent
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Fail if required Dimension settings not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`) for using Dimension.
|
||||
with_items:
|
||||
@ -8,7 +8,7 @@
|
||||
when: "matrix_dimension_enabled and vars[item] == ''"
|
||||
|
||||
- name: (Deprecation) Catch and report renamed Dimension variables
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Your configuration contains a variable, which now has a different name.
|
||||
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
||||
|
Reference in New Issue
Block a user