matrix-docker-ansible-deploy/roles/custom/matrix-authentication-service/tasks/mas_cli_doctor.yml
Suguru Hirahara 8e63f12fbe
Setting up REUSE: add copyright statements to yml files in roles/custom/
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-08 05:01:07 +09:00

37 lines
1.3 KiB
YAML

# SPDX-FileCopyrightText: 2024 MDAD Team and contributors
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
- name: Ensure Matrix Authentication Service is started
ansible.builtin.service:
name: matrix-authentication-service
state: started
daemon_reload: true
register: matrix_authentication_service_mas_ensure_started_result
- name: Wait a bit, so that Matrix Authentication Service can start
when: matrix_authentication_service_mas_ensure_started_result.changed | bool
ansible.builtin.wait_for:
timeout: "{{ matrix_authentication_service_syn2mas_start_wait_time_seconds }}"
delegate_to: 127.0.0.1
become: false
- name: Generate mas-cli doctor command
ansible.builtin.set_fact:
matrix_authentication_service_mas_cli_doctor_command: >-
{{ matrix_authentication_service_bin_path }}/mas-cli doctor
tags:
- skip_ansible_lint
- name: Run mas-cli doctor
ansible.builtin.command:
cmd: "{{ matrix_authentication_service_mas_cli_doctor_command }}"
register: matrix_authentication_service_mas_cli_doctor_command_result
changed_when: matrix_authentication_service_mas_cli_doctor_command_result.rc == 0
- name: Print mas-cli doctor command result
ansible.builtin.debug:
var: matrix_authentication_service_mas_cli_doctor_command_result