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,6 +1,6 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_registration_requires_restart: false
|
||||
|
||||
- block:
|
||||
@ -10,7 +10,7 @@
|
||||
register: matrix_registration_sqlite_database_path_local_stat_result
|
||||
|
||||
- block:
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_postgres_db_migration_request:
|
||||
src: "{{ matrix_registration_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_registration_database_connection_string }}"
|
||||
@ -26,13 +26,13 @@
|
||||
|
||||
- import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_registration_requires_restart: true
|
||||
when: "matrix_registration_sqlite_database_path_local_stat_result.stat.exists|bool"
|
||||
when: "matrix_registration_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure matrix-registration paths exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -58,7 +58,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-registration repository is present when self-building
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_registration_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_registration_docker_src_files_path }}"
|
||||
version: "{{ matrix_registration_container_image_self_build_branch }}"
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
# See: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1864
|
||||
- name: Patch setup.py to allow self-built version to work
|
||||
lineinfile:
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ matrix_registration_docker_src_files_path }}/setup.py"
|
||||
regexp: 'flask-limiter'
|
||||
line: '"flask-limiter~=1.1.0", "Markupsafe<2.1",'
|
||||
@ -89,7 +89,7 @@
|
||||
when: "matrix_registration_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-registration config installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_registration_configuration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_registration_config_path }}/config.yaml"
|
||||
mode: 0644
|
||||
@ -97,19 +97,19 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure matrix-registration.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-registration.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-registration.service"
|
||||
mode: 0644
|
||||
register: matrix_registration_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-registration.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_registration_systemd_service_result.changed|bool"
|
||||
|
||||
- name: Ensure matrix-registration.service restarted, if necessary
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "matrix-registration.service"
|
||||
state: restarted
|
||||
when: "matrix_registration_requires_restart|bool"
|
||||
|
Reference in New Issue
Block a user