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:
@ -2,17 +2,17 @@
|
||||
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
|
||||
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407
|
||||
- name: Fail if trying to self-build on Ansible < 2.8
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: "To self-build the Element image, you should use Ansible 2.8 or higher. See docs/ansible.md"
|
||||
when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_synapse_admin_container_image_self_build and matrix_synapse_admin_enabled"
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-synapse-admin.service'] }}"
|
||||
when: matrix_synapse_admin_enabled|bool
|
||||
|
||||
- block:
|
||||
- name: Fail if matrix-nginx-proxy role already executed
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Trying to append Synapse Admin's reverse-proxying configuration to matrix-nginx-proxy,
|
||||
but it's pointless since the matrix-nginx-proxy role had already executed.
|
||||
@ -21,7 +21,7 @@
|
||||
when: matrix_nginx_proxy_role_executed|default(False)|bool
|
||||
|
||||
- name: Generate Synapse Admin proxying configuration for matrix-nginx-proxy
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
matrix_synapse_admin_matrix_nginx_proxy_configuration: |
|
||||
rewrite ^{{ matrix_synapse_admin_public_endpoint }}$ {{ matrix_nginx_proxy_x_forwarded_proto_value }}://$server_name{{ matrix_synapse_admin_public_endpoint }}/ permanent;
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
- name: Register Synapse Admin proxying configuration with matrix-nginx-proxy
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks: |
|
||||
{{
|
||||
matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks|default([])
|
||||
@ -50,7 +50,7 @@
|
||||
when: matrix_synapse_admin_enabled|bool
|
||||
|
||||
- name: Warn about reverse-proxying if matrix-nginx-proxy not used
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
NOTE: You've enabled the Synapse Admin tool but are not using the matrix-nginx-proxy
|
||||
reverse proxy.
|
||||
|
@ -17,7 +17,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-synapse-admin repository is present when self-building
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_synapse_admin_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_synapse_admin_docker_src_files_path }}"
|
||||
version: "{{ matrix_synapse_admin_docker_image.split(':')[1] }}"
|
||||
@ -40,7 +40,7 @@
|
||||
when: "matrix_synapse_admin_enabled|bool and matrix_synapse_admin_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-synapse-admin.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-synapse-admin.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-synapse-admin.service"
|
||||
mode: 0644
|
||||
@ -48,7 +48,7 @@
|
||||
when: matrix_synapse_admin_enabled|bool
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-synapse-admin.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_synapse_admin_enabled|bool and matrix_synapse_admin_systemd_service_result.changed"
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
register: matrix_synapse_admin_service_stat
|
||||
|
||||
- name: Ensure matrix-synapse-admin is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-synapse-admin
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -71,13 +71,13 @@
|
||||
when: "not matrix_synapse_admin_enabled|bool and matrix_synapse_admin_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-synapse-admin.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-synapse-admin.service"
|
||||
state: absent
|
||||
when: "not matrix_synapse_admin_enabled|bool and matrix_synapse_admin_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-synapse-admin.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "not matrix_synapse_admin_enabled|bool and matrix_synapse_admin_service_stat.stat.exists"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: (Deprecation) Catch and report renamed settings
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Your configuration contains a variable, which now has a different name.
|
||||
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
||||
|
Reference in New Issue
Block a user