fix: all praise the allmighty yamllinter
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
stat:
|
||||
path: "{{ matrix_synapse_media_store_path }}"
|
||||
register: local_path_media_store_stat
|
||||
ignore_errors: yes
|
||||
ignore_errors: true
|
||||
|
||||
# This is separate and conditional, to ensure we don't execute it
|
||||
# if the path already exists or we failed to check, because it's mounted using fuse.
|
||||
@ -19,32 +19,32 @@
|
||||
when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists"
|
||||
|
||||
- block:
|
||||
- name: Ensure Synapse repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_synapse_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_synapse_docker_src_files_path }}"
|
||||
version: "{{ matrix_synapse_docker_image.split(':')[1] }}"
|
||||
force: "yes"
|
||||
register: matrix_synapse_git_pull_results
|
||||
- name: Ensure Synapse repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_synapse_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_synapse_docker_src_files_path }}"
|
||||
version: "{{ matrix_synapse_docker_image.split(':')[1] }}"
|
||||
force: "yes"
|
||||
register: matrix_synapse_git_pull_results
|
||||
|
||||
- name: Check if Synapse Docker image exists
|
||||
command: "{{ matrix_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_docker_image }}'"
|
||||
register: matrix_synapse_docker_image_check_result
|
||||
- name: Check if Synapse Docker image exists
|
||||
command: "{{ matrix_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_docker_image }}'"
|
||||
register: matrix_synapse_docker_image_check_result
|
||||
|
||||
# Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module,
|
||||
# because the latter does not support BuildKit.
|
||||
# See: https://github.com/ansible-collections/community.general/issues/514
|
||||
- name: Ensure Synapse Docker image is built
|
||||
shell:
|
||||
chdir: "{{ matrix_synapse_docker_src_files_path }}"
|
||||
cmd: |
|
||||
{{ matrix_host_command_docker }} build \
|
||||
-t "{{ matrix_synapse_docker_image }}" \
|
||||
-f docker/Dockerfile \
|
||||
.
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
when: "matrix_synapse_git_pull_results.changed|bool or matrix_synapse_docker_image_check_result.stdout == ''"
|
||||
# Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module,
|
||||
# because the latter does not support BuildKit.
|
||||
# See: https://github.com/ansible-collections/community.general/issues/514
|
||||
- name: Ensure Synapse Docker image is built
|
||||
shell:
|
||||
chdir: "{{ matrix_synapse_docker_src_files_path }}"
|
||||
cmd: |
|
||||
{{ matrix_host_command_docker }} build \
|
||||
-t "{{ matrix_synapse_docker_image }}" \
|
||||
-f docker/Dockerfile \
|
||||
.
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
when: "matrix_synapse_git_pull_results.changed|bool or matrix_synapse_docker_image_check_result.stdout == ''"
|
||||
when: "matrix_synapse_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure Synapse Docker image is pulled
|
||||
@ -105,7 +105,7 @@
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-synapse.service installation
|
||||
service:
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
when: "matrix_synapse_systemd_service_result.changed"
|
||||
|
||||
- name: Ensure matrix-synapse-register-user script created
|
||||
|
@ -1,3 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Check existence of matrix-synapse service
|
||||
stat:
|
||||
path: "{{ matrix_systemd_path }}/matrix-synapse.service"
|
||||
@ -7,8 +9,8 @@
|
||||
service:
|
||||
name: matrix-synapse
|
||||
state: stopped
|
||||
enabled: no
|
||||
daemon_reload: yes
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
register: stopping_result
|
||||
when: "matrix_synapse_service_stat.stat.exists"
|
||||
|
||||
@ -20,7 +22,7 @@
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-synapse.service removal
|
||||
service:
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
when: "matrix_synapse_service_stat.stat.exists"
|
||||
|
||||
- name: Ensure Synapse Docker image doesn't exist
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
# Below is a huge hack for dynamically building a list of workers and finally assigning it to `matrix_synapse_workers_enabled_list`.
|
||||
#
|
||||
# set_fact within a loop does not work reliably in Ansible (it only executes on the first iteration for some reason),
|
||||
|
@ -8,7 +8,7 @@
|
||||
name: "{{ item.key }}"
|
||||
state: stopped
|
||||
with_dict: "{{ ansible_facts.services|default({})|dict2items|selectattr('key', 'match', 'matrix-synapse-worker-.+\\.service')|list|items2dict }}"
|
||||
when: "item.value['status'] != 'not-found'" # see https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1461
|
||||
when: "item.value['status'] != 'not-found'" # see https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1461
|
||||
|
||||
- name: Find worker configs to be cleaned
|
||||
find:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
# The tasks below run before `validate_config.yml`.
|
||||
# To avoid failing with a cryptic error message, we'll do validation here.
|
||||
#
|
||||
|
@ -1,3 +1,5 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
matrix_synapse_worker_systemd_service_name: "matrix-synapse-worker-{{ matrix_synapse_worker_details.type }}-{{ matrix_synapse_worker_details.instanceId }}"
|
||||
|
||||
|
Reference in New Issue
Block a user