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,5 +1,5 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-email2matrix.service'] }}"
|
||||
when: matrix_email2matrix_enabled|bool
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Ensure Email2Matrix paths exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -14,7 +14,7 @@
|
||||
when: "item.when|bool"
|
||||
|
||||
- name: Ensure Email2Matrix configuration file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/config.json.j2"
|
||||
dest: "{{ matrix_email2matrix_config_dir_path }}/config.json"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -34,7 +34,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure Email2Matrix repository is present on self-build
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_email2matrix_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_email2matrix_docker_src_files_path }}"
|
||||
version: "{{ matrix_email2matrix_container_image_self_build_branch }}"
|
||||
@ -57,13 +57,13 @@
|
||||
when: "matrix_email2matrix_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-email2matrix.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-email2matrix.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-email2matrix.service"
|
||||
mode: 0644
|
||||
register: matrix_email2matrix_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-email2matrix.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_email2matrix_systemd_service_result.changed|bool"
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_email2matrix_service_stat
|
||||
|
||||
- name: Ensure matrix-email2matrix is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-email2matrix
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -15,18 +15,18 @@
|
||||
when: "matrix_email2matrix_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure matrix-email2matrix.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-email2matrix.service"
|
||||
state: absent
|
||||
when: "matrix_email2matrix_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-email2matrix.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_email2matrix_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure Email2Matrix data path doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_email2matrix_base_path }}"
|
||||
state: absent
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if no mappings
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >
|
||||
You need to define at least one mapping in `matrix_email2matrix_matrix_mappings` for enabling Email2Matrix.
|
||||
when: "matrix_email2matrix_matrix_mappings|length == 0"
|
||||
|
Reference in New Issue
Block a user