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:
@ -8,7 +8,7 @@
|
||||
register: ma1sd_migrate_mxisd_data_dir_stat
|
||||
|
||||
- name: Warn if mxisd data detected
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: >
|
||||
You seem to have an existing mxisd folder in `{{ matrix_base_data_path }}/mxisd`.
|
||||
We are going to migrate it to ma1sd and rename the folder to mxisd.migrated.
|
||||
@ -20,7 +20,7 @@
|
||||
register: matrix_mxisd_service_stat
|
||||
|
||||
- name: Ensure matrix-mxisd is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-mxisd
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -34,7 +34,7 @@
|
||||
when: "ma1sd_migrate_mxisd_data_dir_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-ma1sd is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-ma1sd
|
||||
state: stopped
|
||||
daemon_reload: true
|
||||
@ -44,7 +44,7 @@
|
||||
# recursively copy remote directories (like `/matrix/mxisd/data/sign.key`) in older versions of Ansible.
|
||||
- block:
|
||||
- name: Copy mxisd data files to ma1sd folder
|
||||
command: "cp -ar {{ matrix_base_data_path }}/mxisd/data {{ matrix_ma1sd_base_path }}"
|
||||
ansible.builtin.command: "cp -ar {{ matrix_base_data_path }}/mxisd/data {{ matrix_ma1sd_base_path }}"
|
||||
|
||||
- name: Check existence of mxisd.db file
|
||||
stat:
|
||||
@ -52,20 +52,20 @@
|
||||
register: matrix_ma1sd_mxisd_db_stat
|
||||
|
||||
- name: Rename database (mxisd.db -> ma1sd.db)
|
||||
command: "mv {{ matrix_ma1sd_data_path }}/mxisd.db {{ matrix_ma1sd_data_path }}/ma1sd.db"
|
||||
ansible.builtin.command: "mv {{ matrix_ma1sd_data_path }}/mxisd.db {{ matrix_ma1sd_data_path }}/ma1sd.db"
|
||||
when: "matrix_ma1sd_mxisd_db_stat.stat.exists"
|
||||
|
||||
- name: Rename mxisd folder
|
||||
command: "mv {{ matrix_base_data_path }}/mxisd {{ matrix_base_data_path }}/mxisd.migrated"
|
||||
ansible.builtin.command: "mv {{ matrix_base_data_path }}/mxisd {{ matrix_base_data_path }}/mxisd.migrated"
|
||||
when: "ma1sd_migrate_mxisd_data_dir_stat.stat.exists"
|
||||
|
||||
- name: Ensure outdated matrix-mxisd.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-mxisd.service"
|
||||
state: absent
|
||||
when: "matrix_mxisd_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after removing outdated matrix-mxisd.service
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_mxisd_service_stat.stat.exists"
|
||||
|
Reference in New Issue
Block a user