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,10 +1,10 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] }}"
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Fail if on an unsupported architecture
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: "Jitsi only supports the amd64 architecture right now. See https://github.com/jitsi/docker-jitsi-meet/issues/1069 and https://github.com/jitsi/docker-jitsi-meet/issues/1214"
|
||||
when: matrix_jitsi_enabled|bool and matrix_architecture not in ['amd64', 'arm64']
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Matrix jitsi base path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Matrix jitsi-jicofo path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0777
|
||||
@ -29,7 +29,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure jitsi-jicofo environment variables file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jicofo/env.j2"
|
||||
dest: "{{ matrix_jitsi_jicofo_base_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -38,7 +38,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure jitsi-jicofo configuration files created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jicofo/{{ item }}.j2"
|
||||
dest: "{{ matrix_jitsi_jicofo_config_path }}/{{ item }}"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -50,7 +50,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure matrix-jitsi-jicofo.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jicofo/matrix-jitsi-jicofo.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-jitsi-jicofo.service"
|
||||
mode: 0644
|
||||
@ -58,7 +58,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-jicofo.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_jitsi_enabled and matrix_jitsi_jicofo_systemd_service_result.changed"
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
||||
- name: Ensure matrix-jitsi-jicofo is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-jitsi-jicofo
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -82,18 +82,18 @@
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jicofo_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-jitsi-jicofo.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-jitsi-jicofo.service"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jicofo_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-jicofo.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jicofo_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Matrix jitsi-jicofo paths doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_jitsi_jicofo_base_path }}"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Matrix jitsi-jvb path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0777
|
||||
@ -29,7 +29,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure jitsi-jvb configuration files created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jvb/{{ item }}.j2"
|
||||
dest: "{{ matrix_jitsi_jvb_config_path }}/{{ item }}"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -41,7 +41,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure jitsi-jvb environment variables file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jvb/env.j2"
|
||||
dest: "{{ matrix_jitsi_jvb_base_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -50,7 +50,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure matrix-jitsi-jvb.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/jvb/matrix-jitsi-jvb.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-jitsi-jvb.service"
|
||||
mode: 0644
|
||||
@ -58,7 +58,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-jvb.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_jitsi_enabled and matrix_jitsi_jvb_systemd_service_result.changed"
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
||||
- name: Ensure matrix-jitsi-jvb is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-jitsi-jvb
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -82,18 +82,18 @@
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jvb_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-jitsi-jvb.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-jitsi-jvb.service"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jvb_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-jvb.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jvb_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Matrix jitsi-jvb paths doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_jitsi_jvb_base_path }}"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Matrix jitsi-prosody environment exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0777
|
||||
@ -30,7 +30,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure jitsi-prosody environment variables file is created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/prosody/env.j2"
|
||||
dest: "{{ matrix_jitsi_prosody_base_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -39,7 +39,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure matrix-jitsi-prosody.service file is installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/prosody/matrix-jitsi-prosody.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-jitsi-prosody.service"
|
||||
mode: 0644
|
||||
@ -47,13 +47,13 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure systemd service is reloaded after matrix-jitsi-prosody.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_jitsi_enabled and matrix_jitsi_prosody_systemd_service_result.changed"
|
||||
|
||||
- name: Ensure authentication is properly configured
|
||||
include_tasks:
|
||||
file: "{{ role_path }}/tasks/util/setup_jitsi_auth.yml"
|
||||
ansible.builtin.file: "{{ role_path }}/tasks/util/setup_jitsi_auth.yml"
|
||||
when:
|
||||
- matrix_jitsi_enabled|bool
|
||||
- matrix_jitsi_enable_auth|bool
|
||||
@ -70,7 +70,7 @@
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
||||
- name: Ensure matrix-jitsi-prosody is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-jitsi-prosody
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -79,18 +79,18 @@
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_prosody_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-jitsi-prosody.service file doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-jitsi-prosody.service"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_prosody_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd is reloaded after matrix-jitsi-prosody.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_prosody_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Matrix jitsi-prosody paths doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_jitsi_prosody_base_path }}"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Matrix jitsi-web path exists
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0777
|
||||
@ -31,7 +31,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure jitsi-web environment variables file created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/web/env.j2"
|
||||
dest: "{{ matrix_jitsi_web_base_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -40,7 +40,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure jitsi-web configuration files created
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/web/{{ item }}.j2"
|
||||
dest: "{{ matrix_jitsi_web_config_path }}/{{ item }}"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -52,7 +52,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure matrix-jitsi-web.service installed
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/web/matrix-jitsi-web.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-jitsi-web.service"
|
||||
mode: 0644
|
||||
@ -60,7 +60,7 @@
|
||||
when: matrix_jitsi_enabled|bool
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-web.service installation
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_jitsi_enabled and matrix_jitsi_web_systemd_service_result.changed"
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
||||
- name: Ensure matrix-jitsi-web is stopped
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: matrix-jitsi-web
|
||||
state: stopped
|
||||
enabled: false
|
||||
@ -84,18 +84,18 @@
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_web_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure matrix-jitsi-web.service doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-jitsi-web.service"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_web_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-jitsi-web.service removal
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "not matrix_jitsi_enabled|bool and matrix_jitsi_web_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Matrix jitsi-web paths doesn't exist
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_jitsi_web_base_path }}"
|
||||
state: absent
|
||||
when: "not matrix_jitsi_enabled|bool"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure matrix-jitsi-prosody container is running
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
state: started
|
||||
name: matrix-jitsi-prosody
|
||||
register: matrix_jitsi_prosody_start_result
|
||||
@ -15,7 +15,7 @@
|
||||
#
|
||||
|
||||
- name: Ensure Jitsi internal authentication users are configured
|
||||
shell: "docker exec matrix-jitsi-prosody prosodyctl --config /config/prosody.cfg.lua register {{ item.username | quote }} meet.jitsi {{ item.password | quote }}"
|
||||
ansible.builtin.shell: "docker exec matrix-jitsi-prosody prosodyctl --config /config/prosody.cfg.lua register {{ item.username | quote }} meet.jitsi {{ item.password | quote }}"
|
||||
with_items: "{{ matrix_jitsi_prosody_auth_internal_accounts }}"
|
||||
when:
|
||||
- matrix_jitsi_auth_type == "internal"
|
||||
@ -33,7 +33,7 @@
|
||||
# Stop Necessary Services
|
||||
#
|
||||
- name: Ensure matrix-jitsi-prosody container is stopped if necessary
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
state: stopped
|
||||
name: matrix-jitsi-prosody
|
||||
when: matrix_jitsi_prosody_start_result.changed|bool
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if required Jitsi settings not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`) to properly configure Jitsi.
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
- name: Fail if a Jitsi internal authentication account is not defined
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
At least one Jitsi user needs to be defined in `matrix_jitsi_prosody_auth_internal_accounts` when using internal authentication.
|
||||
If you're setting up Jitsi for the first time, you may have missed a step.
|
||||
@ -33,7 +33,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