build stuff and generate config

This commit is contained in:
histausse 2021-08-06 03:28:11 +02:00
parent 3f412974fd
commit bc54f67e59
Signed by: histausse
GPG key ID: 67486F107F62E9E9
3 changed files with 21 additions and 6 deletions

View file

@ -37,6 +37,18 @@
git:
repo: 'https://github.com/t2bot/matrix-appservice-discord.git'
dest: /srv/matrix-appservice-discord
# They should be an handler here the rebuild the bot
- name: Build typescript
shell:
cmd: npm run build
chdir: /srv/matrix-appservice-discord
creates: /srv/matrix-appservice-discord/build
- name: Install dependencies
npm:
path: /srv/matrix-appservice-discord
state: latest
- name: Configure the bridge
template:
@ -47,10 +59,13 @@
mode: '0660'
- name: Generate discord-registration.yaml
debug:
msg: "TODO: Generate discord-registration.yaml"
shell:
cmd: "node build/src/discordas.js -r -u 'http://localhost:9005' -c config.yaml"
chdir: /srv/matrix-appservice-discord
creates: /srv/matrix-appservice-discord/discord-registration.yaml
notify: Restart synapse
- name:
- name: Copy config for synapse
file:
src: /srv/matrix-appservice-discord/discord-registration.yaml
dest: /etc/matrix-synapse/discord-registration.yaml

View file

@ -4,7 +4,7 @@
name: nginx
state: reloaded
- name: Reload synapse
- name: Restart synapse
systemd:
name: matrix-synapse
state: reloaded
state: restarted

View file

@ -58,7 +58,7 @@
template:
src: homeserver.yaml
dest: /etc/matrix-synapse/homeserver.yaml
notify: Reload synapse
notify: Restart synapse
# --- DRAFT ---
- name: Install nginx