matrix-docker-compose/ansible/roles/synapse/tasks/main.yml
2024-02-21 18:02:22 +09:00

75 lines
1.9 KiB
YAML

- name: Copy docker-compose contents
ansible.builtin.copy:
src: files/basedir/
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- files
- name: Create nginx dir
ansible.builtin.file:
path: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/nginx
state: directory
owner: "{{ ansible_user }}"
mode: '0755'
tags:
- nginx
- dir
- name: Create nginx config
ansible.builtin.template:
src: "nginx/synapse.conf"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/nginx/synapse.conf
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- nginx
- synapse
- name: Create config dir
ansible.builtin.file:
path: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config
state: directory
owner: "{{ ansible_user }}"
mode: '0755'
tags:
- synapse
- dir
- name: Create homeserver configuration
ansible.builtin.template:
src: "synapse/homeserver.yaml"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/synapse-worker-{{ item }}.yaml
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- log
- synapse
loop:
- generic
- federation
- sync
- name: Create worker configurations
ansible.builtin.template:
src: "synapse/synapse-worker.yaml"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/synapse-worker-{{ item }}.yaml
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- log
- synapse
loop:
- generic
- federation
- sync
- name: Create log configurations
ansible.builtin.template:
src: "synapse/log.yaml"
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/log-{{ item }}.yaml
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- log
- synapse
loop:
- worker-generic
- worker-federation
- worker-sync
- homeserver