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

@ -1,12 +1,12 @@
---
- set_fact:
- ansible.builtin.set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-etherpad.service'] }}"
when: matrix_etherpad_enabled|bool
- block:
- name: Fail if matrix-nginx-proxy role already executed
fail:
ansible.builtin.fail:
msg: >-
Trying to append Etherpad's reverse-proxying configuration to matrix-nginx-proxy,
but it's pointless since the matrix-nginx-proxy role had already executed.
@ -15,7 +15,7 @@
when: matrix_nginx_proxy_role_executed|default(False)|bool
- name: Generate Etherpad proxying configuration for matrix-nginx-proxy
set_fact:
ansible.builtin.set_fact:
matrix_etherpad_matrix_nginx_proxy_configuration: |
rewrite ^{{ matrix_etherpad_public_endpoint }}$ {{ matrix_nginx_proxy_x_forwarded_proto_value }}://$server_name{{ matrix_etherpad_public_endpoint }}/ permanent;
@ -42,7 +42,7 @@
}
- name: Register Etherpad proxying configuration with matrix-nginx-proxy
set_fact:
ansible.builtin.set_fact:
matrix_nginx_proxy_proxy_dimension_additional_server_configuration_blocks: |
{{
matrix_nginx_proxy_proxy_dimension_additional_server_configuration_blocks|default([])
@ -54,7 +54,7 @@
when: matrix_etherpad_enabled|bool
- name: Warn about reverse-proxying if matrix-nginx-proxy not used
debug:
ansible.builtin.debug:
msg: >-
NOTE: You've enabled the Etherpad tool but are not using the matrix-nginx-proxy
reverse proxy.

View File

@ -1,7 +1,7 @@
---
- name: Ensure Etherpad base path exists
file:
ansible.builtin.file:
path: "{{ matrix_etherpad_base_path }}"
state: directory
mode: 0770
@ -9,7 +9,7 @@
group: "{{ matrix_etherpad_user_gid }}"
- name: Ensure Etherpad config installed
copy:
ansible.builtin.copy:
content: "{{ matrix_etherpad_configuration|to_nice_json }}"
dest: "{{ matrix_etherpad_base_path }}/settings.json"
mode: 0640
@ -28,13 +28,13 @@
until: result is not failed
- name: Ensure matrix-etherpad.service installed
template:
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-etherpad.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-etherpad.service"
mode: 0644
register: matrix_etherpad_systemd_service_result
- name: Ensure systemd reloaded after matrix-etherpad.service installation
service:
ansible.builtin.service:
daemon_reload: true
when: "matrix_etherpad_systemd_service_result.changed|bool"

View File

@ -6,7 +6,7 @@
register: matrix_etherpad_service_stat
- name: Ensure matrix-etherpad is stopped
service:
ansible.builtin.service:
name: matrix-etherpad
state: stopped
enabled: false
@ -15,18 +15,18 @@
when: "matrix_etherpad_service_stat.stat.exists|bool"
- name: Ensure matrix-etherpad.service doesn't exist
file:
ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-etherpad.service"
state: absent
when: "matrix_etherpad_service_stat.stat.exists|bool"
- name: Ensure systemd reloaded after matrix-etherpad.service removal
service:
ansible.builtin.service:
daemon_reload: true
when: "matrix_etherpad_service_stat.stat.exists|bool"
- name: Ensure Etherpad base directory doesn't exist
file:
ansible.builtin.file:
path: "{{ matrix_etherpad_base_path }}"
state: absent

View File

@ -1,13 +1,13 @@
---
- name: Fail if Etherpad is enabled without the Dimension integrations manager
fail:
ansible.builtin.fail:
msg: >-
To integrate Etherpad notes with Matrix rooms you need to set "matrix_dimension_enabled" to true
when: "not matrix_dimension_enabled|bool"
- name: Fail if no database is configured for Etherpad
fail:
ansible.builtin.fail:
msg: >-
Etherpad requires a dedicated Postgres database. Please enable the built in one, or configure an external DB by redefining "matrix_etherpad_database_hostname"
when: matrix_etherpad_database_hostname == "matrix-postgres" and not matrix_postgres_enabled