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:
Slavi Pantaleev
2022-07-18 10:39:08 +03:00
parent 78b5be4a26
commit 34cdaade08
297 changed files with 1420 additions and 1420 deletions

View File

@ -2,17 +2,17 @@
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
# We don't want to fail in such cases.
- name: Fail if matrix-synapse role already executed
fail:
ansible.builtin.fail:
msg: >-
The matrix-bridge-heisenbridge role needs to execute before the matrix-synapse role.
when: "matrix_heisenbridge_enabled and matrix_synapse_role_executed|default(False)"
- set_fact:
- ansible.builtin.set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-heisenbridge.service'] }}"
when: matrix_heisenbridge_enabled|bool
# If the matrix-synapse role is not used, these variables may not exist.
- set_fact:
- ansible.builtin.set_fact:
matrix_synapse_container_extra_arguments: >
{{
matrix_synapse_container_extra_arguments|default([])

View File

@ -12,7 +12,7 @@
until: result is not failed
- name: Ensure heisenbridge paths exist
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0750
@ -22,7 +22,7 @@
- "{{ matrix_heisenbridge_base_path }}"
- name: Ensure heisenbridge registration.yaml installed if provided
copy:
ansible.builtin.copy:
content: "{{ matrix_heisenbridge_registration|to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_heisenbridge_base_path }}/registration.yaml"
mode: 0644
@ -30,13 +30,13 @@
group: "{{ matrix_user_groupname }}"
- name: Ensure matrix-heisenbridge.service installed
template:
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-heisenbridge.service"
mode: 0644
register: matrix_heisenbridge_systemd_service_result
- name: Ensure systemd reloaded after matrix-heisenbridge.service installation
service:
ansible.builtin.service:
daemon_reload: true
when: matrix_heisenbridge_systemd_service_result.changed

View File

@ -6,7 +6,7 @@
register: matrix_heisenbridge_service_stat
- name: Ensure matrix-heisenbridge is stopped
service:
ansible.builtin.service:
name: matrix-heisenbridge
state: stopped
enabled: false
@ -14,12 +14,12 @@
when: "matrix_heisenbridge_service_stat.stat.exists"
- name: Ensure matrix-heisenbridge.service doesn't exist
file:
ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-heisenbridge.service"
state: absent
when: "matrix_heisenbridge_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-heisenbridge.service removal
service:
ansible.builtin.service:
daemon_reload: true
when: "matrix_heisenbridge_service_stat.stat.exists"