add initial homeserver.yaml
This commit is contained in:
parent
e5350b639b
commit
0dcb46895a
6 changed files with 2957 additions and 41 deletions
|
@ -6,6 +6,12 @@
|
||||||
name: base
|
name: base
|
||||||
tags:
|
tags:
|
||||||
- base
|
- base
|
||||||
|
- name: Add synapse configuration
|
||||||
|
include_role:
|
||||||
|
name: synapse-base
|
||||||
|
tags:
|
||||||
|
- synapse
|
||||||
|
when: '"synapse" in docker_compose'
|
||||||
- name: Add docker-compose
|
- name: Add docker-compose
|
||||||
include_role:
|
include_role:
|
||||||
name: docker-compose
|
name: docker-compose
|
||||||
|
|
|
@ -1,14 +1,4 @@
|
||||||
---
|
---
|
||||||
# Cannot use the standard, hosts use /etc/ssh/keys/%u
|
|
||||||
# - name: Add SSH public keys
|
|
||||||
# authorized_key:
|
|
||||||
# user: "nschottelius"
|
|
||||||
# state: present
|
|
||||||
# key: "{{ item }}"
|
|
||||||
# with_items: "{{ ssh_keys }}"
|
|
||||||
# tags:
|
|
||||||
# - base
|
|
||||||
# - ssh
|
|
||||||
- name: Add SSH public keys
|
- name: Add SSH public keys
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: authorized_keys.j2
|
src: authorized_keys.j2
|
||||||
|
@ -19,28 +9,3 @@
|
||||||
tags:
|
tags:
|
||||||
- ssh
|
- ssh
|
||||||
- base
|
- base
|
||||||
- name:
|
|
||||||
authorized_key:
|
|
||||||
user: "nschottelius"
|
|
||||||
state: present
|
|
||||||
key: "{{ item }}"
|
|
||||||
with_items: "{{ ssh_keys }}"
|
|
||||||
tags:
|
|
||||||
- base
|
|
||||||
- ssh
|
|
||||||
- name: Mount data NFS volume
|
|
||||||
ansible.posix.mount:
|
|
||||||
src: 10.165.71.1:/mtx_syna_lat_internal_ru
|
|
||||||
path: /mnt
|
|
||||||
state: mounted
|
|
||||||
fstype: nfs
|
|
||||||
when: '"synapse" in docker_compose'
|
|
||||||
- name: Create docker-compose project directories
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /mnt/synapse_data
|
|
||||||
state: directory
|
|
||||||
mode: '0700'
|
|
||||||
owner: "{{ ansible_user }}"
|
|
||||||
tags:
|
|
||||||
- directory
|
|
||||||
when: '"synapse" in docker_compose'
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SYNAPSE_VERSION=v1.92.3
|
SYNAPSE_VERSION=v1.92.3
|
||||||
|
|
||||||
HOME_SERVER_FQDN=corp-serv.net
|
SYNAPSE_SERVER_NAME=corp-serv.net
|
||||||
SYNAPSE_FQDN=synapse.corp-apps.com
|
NGINX_SYNAPSE_FQDN=synapse.corp-apps.com
|
||||||
|
|
2922
ansible/roles/docker-compose/files/synapse/config/homeserver.yaml
Executable file
2922
ansible/roles/docker-compose/files/synapse/config/homeserver.yaml
Executable file
File diff suppressed because it is too large
Load diff
|
@ -3,12 +3,13 @@ services:
|
||||||
synapse:
|
synapse:
|
||||||
image: matrixdotorg/synapse:${SYNAPSE_VERSION}
|
image: matrixdotorg/synapse:${SYNAPSE_VERSION}
|
||||||
environment:
|
environment:
|
||||||
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
|
||||||
- SERVERNAME=${HOME_SERVER_FQDN}
|
|
||||||
- PUBLICBASEURL=${SYNAPSE_FQDN}
|
|
||||||
ports:
|
ports:
|
||||||
- "8008:8008/tcp"
|
- "8008:8008/tcp"
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/synapse_data:/data
|
- /mnt/synapse_data:/data
|
||||||
entrypoint: sh -c "/data/homeserver.yaml.sh && chmod -R 777 /data && /start.py"
|
- ./config:/config
|
||||||
|
command:
|
||||||
|
- run
|
||||||
|
- --config-path=/config/homeserver.yaml
|
||||||
|
# - --config-path=/config/generic_worker.yaml
|
||||||
restart: always
|
restart: always
|
||||||
|
|
22
ansible/roles/synapse-base/tasks/main.yml
Normal file
22
ansible/roles/synapse-base/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
- name: Mount data NFS volume
|
||||||
|
ansible.posix.mount:
|
||||||
|
src: 10.165.71.1:/mtx_syna_lat_internal_ru
|
||||||
|
path: /mnt
|
||||||
|
state: mounted
|
||||||
|
fstype: nfs
|
||||||
|
- name: Create docker-compose project directories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /mnt/synapse_data
|
||||||
|
state: directory
|
||||||
|
mode: '0700'
|
||||||
|
owner: "{{ ansible_user }}"
|
||||||
|
tags:
|
||||||
|
- directory
|
||||||
|
# - name: Create homeserver.yaml file
|
||||||
|
# ansible.builtin.copy:
|
||||||
|
# src: files/homeserver.yaml
|
||||||
|
# dest: /mnt/synapse_data/homeserver.yaml
|
||||||
|
# owner: "{{ ansible_user }}"
|
||||||
|
# mode: '0600'
|
||||||
|
# tags:
|
||||||
|
# - files
|
Loading…
Reference in a new issue