More ansible-lint fixes
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-coturn.service'] }}"
|
||||
when: matrix_coturn_enabled|bool
|
||||
when: matrix_coturn_enabled | bool
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-coturn-reload.timer'] }}"
|
||||
when: "matrix_coturn_enabled|bool and matrix_coturn_tls_enabled|bool"
|
||||
when: "matrix_coturn_enabled | bool and matrix_coturn_tls_enabled | bool"
|
||||
|
@ -1,23 +1,23 @@
|
||||
---
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/init.yml"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: "run_setup|bool and matrix_coturn_enabled|bool"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: "run_setup | bool and matrix_coturn_enabled | bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-coturn
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||
when: "run_setup|bool and matrix_coturn_enabled|bool"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||
when: "run_setup | bool and matrix_coturn_enabled | bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-coturn
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||
when: "run_setup|bool and not matrix_coturn_enabled|bool"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||
when: "run_setup | bool and not matrix_coturn_enabled | bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-coturn
|
||||
|
@ -15,7 +15,7 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- {path: "{{ matrix_coturn_docker_src_files_path }}", when: "{{ matrix_coturn_container_image_self_build }}"}
|
||||
when: "item.when|bool"
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure Coturn image is pulled
|
||||
docker_image:
|
||||
@ -23,7 +23,7 @@
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_coturn_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_coturn_docker_image_force_pull }}"
|
||||
when: "not matrix_coturn_container_image_self_build|bool"
|
||||
when: "not matrix_coturn_container_image_self_build | bool"
|
||||
register: result
|
||||
retries: "{{ matrix_container_retries_count }}"
|
||||
delay: "{{ matrix_container_retries_delay }}"
|
||||
@ -50,7 +50,7 @@
|
||||
dockerfile: "{{ matrix_coturn_container_image_self_build_repo_dockerfile_path }}"
|
||||
path: "{{ matrix_coturn_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_coturn_container_image_self_build|bool"
|
||||
when: "matrix_coturn_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure Coturn configuration path exists
|
||||
ansible.builtin.file:
|
||||
@ -89,7 +89,7 @@
|
||||
dest: "{{ matrix_systemd_path }}/{{ item }}"
|
||||
mode: 0644
|
||||
register: "matrix_coturn_systemd_service_change_results"
|
||||
when: "matrix_coturn_tls_enabled|bool"
|
||||
when: "matrix_coturn_tls_enabled | bool"
|
||||
with_items:
|
||||
- matrix-coturn-reload.service
|
||||
- matrix-coturn-reload.timer
|
||||
@ -100,7 +100,7 @@
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
register: "matrix_coturn_systemd_service_change_results"
|
||||
when: "not matrix_coturn_tls_enabled|bool"
|
||||
when: "not matrix_coturn_tls_enabled | bool"
|
||||
with_items:
|
||||
- matrix-coturn-reload.service
|
||||
- matrix-coturn-reload.timer
|
||||
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Check existence of matrix-coturn service
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_systemd_path }}/matrix-coturn.service"
|
||||
register: matrix_coturn_service_stat
|
||||
when: "not matrix_coturn_enabled|bool"
|
||||
when: "not matrix_coturn_enabled | bool"
|
||||
|
||||
- name: Ensure matrix-coturn is stopped
|
||||
ansible.builtin.service:
|
||||
@ -12,7 +12,7 @@
|
||||
state: stopped
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
when: "matrix_coturn_service_stat.stat.exists|bool"
|
||||
when: "matrix_coturn_service_stat.stat.exists | bool"
|
||||
|
||||
- name: Ensure matrix-coturn-reload.timer is stopped
|
||||
ansible.builtin.service:
|
||||
@ -21,7 +21,7 @@
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
failed_when: false
|
||||
when: "matrix_coturn_service_stat.stat.exists|bool"
|
||||
when: "matrix_coturn_service_stat.stat.exists | bool"
|
||||
|
||||
- name: Ensure systemd units don't exist
|
||||
ansible.builtin.file:
|
||||
@ -36,7 +36,7 @@
|
||||
- name: Ensure systemd reloaded after unit removal
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_coturn_systemd_unit_uninstallation_result.changed|bool"
|
||||
when: "matrix_coturn_systemd_unit_uninstallation_result.changed | bool"
|
||||
|
||||
- name: Ensure Matrix coturn paths don't exist
|
||||
ansible.builtin.file:
|
||||
|
Reference in New Issue
Block a user