|
|
@ -1,7 +1,7 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure maubot paths exist
|
|
|
|
- name: Ensure maubot paths exist
|
|
|
|
file:
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
state: directory
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
mode: 0755
|
|
|
@ -17,7 +17,7 @@
|
|
|
|
when: "item.when|bool"
|
|
|
|
when: "item.when|bool"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure maubot configuration file created
|
|
|
|
- name: Ensure maubot configuration file created
|
|
|
|
template:
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/config/config.yaml.j2"
|
|
|
|
src: "{{ role_path }}/templates/config/config.yaml.j2"
|
|
|
|
dest: "{{ matrix_bot_maubot_data_path }}/config.yaml"
|
|
|
|
dest: "{{ matrix_bot_maubot_data_path }}/config.yaml"
|
|
|
|
owner: "{{ matrix_user_username }}"
|
|
|
|
owner: "{{ matrix_user_username }}"
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
mode: "u=rwx"
|
|
|
|
mode: "u=rwx"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure maubot image is pulled
|
|
|
|
- name: Ensure maubot image is pulled
|
|
|
|
docker_image:
|
|
|
|
community.docker.docker_image:
|
|
|
|
name: "{{ matrix_bot_maubot_docker_image }}"
|
|
|
|
name: "{{ matrix_bot_maubot_docker_image }}"
|
|
|
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
|
|
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
|
|
|
force_source: "{{ matrix_bot_maubot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
|
|
|
force_source: "{{ matrix_bot_maubot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
|
|
@ -37,7 +37,7 @@
|
|
|
|
until: result is not failed
|
|
|
|
until: result is not failed
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure maubot repository is present on self-build
|
|
|
|
- name: Ensure maubot repository is present on self-build
|
|
|
|
git:
|
|
|
|
ansible.builtin.git:
|
|
|
|
repo: "{{ matrix_bot_maubot_docker_repo }}"
|
|
|
|
repo: "{{ matrix_bot_maubot_docker_repo }}"
|
|
|
|
dest: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
|
|
|
dest: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
|
|
|
force: "yes"
|
|
|
|
force: "yes"
|
|
|
@ -47,7 +47,7 @@
|
|
|
|
when: "matrix_bot_maubot_container_image_self_build|bool"
|
|
|
|
when: "matrix_bot_maubot_container_image_self_build|bool"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure maubot image is built
|
|
|
|
- name: Ensure maubot image is built
|
|
|
|
docker_image:
|
|
|
|
community.docker.docker_image:
|
|
|
|
name: "{{ matrix_bot_maubot_docker_image }}"
|
|
|
|
name: "{{ matrix_bot_maubot_docker_image }}"
|
|
|
|
source: build
|
|
|
|
source: build
|
|
|
|
force_source: "{{ matrix_bot_maubot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
|
|
|
force_source: "{{ matrix_bot_maubot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
|
|
@ -59,18 +59,18 @@
|
|
|
|
when: "matrix_bot_maubot_container_image_self_build|bool"
|
|
|
|
when: "matrix_bot_maubot_container_image_self_build|bool"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure matrix-bot-maubot.service installed
|
|
|
|
- name: Ensure matrix-bot-maubot.service installed
|
|
|
|
template:
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2"
|
|
|
|
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2"
|
|
|
|
dest: "{{ matrix_systemd_path }}/matrix-bot-maubot.service"
|
|
|
|
dest: "{{ matrix_systemd_path }}/matrix-bot-maubot.service"
|
|
|
|
mode: 0644
|
|
|
|
mode: 0644
|
|
|
|
register: matrix_bot_maubot_systemd_service_result
|
|
|
|
register: matrix_bot_maubot_systemd_service_result
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure systemd reloaded after matrix-bot-maubot.service installation
|
|
|
|
- name: Ensure systemd reloaded after matrix-bot-maubot.service installation
|
|
|
|
service:
|
|
|
|
ansible.builtin.service:
|
|
|
|
daemon_reload: true
|
|
|
|
daemon_reload: true
|
|
|
|
when: "matrix_bot_maubot_systemd_service_result.changed|bool"
|
|
|
|
when: "matrix_bot_maubot_systemd_service_result.changed|bool"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure matrix-bot-maubot.service restarted, if necessary
|
|
|
|
- name: Ensure matrix-bot-maubot.service restarted, if necessary
|
|
|
|
service:
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: "matrix-bot-maubot.service"
|
|
|
|
name: "matrix-bot-maubot.service"
|
|
|
|
state: restarted
|
|
|
|
state: restarted
|
|
|
|