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: git:
repo: 'https://github.com/t2bot/matrix-appservice-discord.git' repo: 'https://github.com/t2bot/matrix-appservice-discord.git'
dest: /srv/matrix-appservice-discord 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 - name: Configure the bridge
template: template:
@ -47,10 +59,13 @@
mode: '0660' mode: '0660'
- name: Generate discord-registration.yaml - name: Generate discord-registration.yaml
debug: shell:
msg: "TODO: Generate discord-registration.yaml" 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: file:
src: /srv/matrix-appservice-discord/discord-registration.yaml src: /srv/matrix-appservice-discord/discord-registration.yaml
dest: /etc/matrix-synapse/discord-registration.yaml dest: /etc/matrix-synapse/discord-registration.yaml

View file

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

View file

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