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:
@ -3,17 +3,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-sms-bridge role needs to execute before the matrix-synapse role.
|
||||
when: "matrix_sms_bridge_enabled and matrix_synapse_role_executed|default(False)"
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-sms-bridge.service'] }}"
|
||||
when: matrix_sms_bridge_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([])
|
||||
|
@ -10,7 +10,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-sms-bridge paths exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
@ -22,7 +22,7 @@
|
||||
- "{{ matrix_sms_bridge_data_path }}"
|
||||
|
||||
- name: Ensure matrix-sms-bridge application.yml installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_sms_bridge_configuration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_sms_bridge_config_path }}/application.yml"
|
||||
mode: 0644
|
||||
@ -30,7 +30,7 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure matrix-sms-bridge registration.yaml installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_sms_bridge_registration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_sms_bridge_config_path }}/registration.yaml"
|
||||
mode: 0644
|
||||
@ -38,7 +38,7 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure android-sms-gateway-server cert installed
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ matrix_sms_bridge_provider_android_truststore_local_path }}"
|
||||
dest: "{{ matrix_sms_bridge_config_path }}/matrix-sms-gateway-server.p12"
|
||||
mode: 0644
|
||||
@ -47,13 +47,13 @@
|
||||
when: matrix_sms_bridge_provider_android_truststore_local_path != ""
|
||||
|
||||
- name: Ensure matrix-sms-bridge.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-sms-bridge.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-sms-bridge.service"
|
||||
mode: 0644
|
||||
register: matrix_sms_bridge_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-sms-bridge.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: matrix_sms_bridge_systemd_service_result.changed
|
||||
|
@ -6,7 +6,7 @@
|
||||
register: matrix_sms_bridge_service_stat
|
||||
|
||||
- name: Ensure matrix-sms-bridge is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-sms-bridge
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -14,7 +14,7 @@
|
||||
when: "matrix_sms_bridge_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-sms-bridge.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-sms-bridge.service"
|
||||
state: absent
|
||||
when: "matrix_sms_bridge_service_stat.stat.exists"
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if required settings not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`).
|
||||
when: "vars[item] == ''"
|
||||
|
Reference in New Issue
Block a user