ansible/roles/matrix-appservice-webhooks/tasks/main.yml

56 lines
1.7 KiB
YAML
Raw Normal View History

---
# Create matrix-appservice-webhooks user and group
- include_tasks: 1_user_group.yml
- name: Clone matrix-appservice-webhooks project
git:
2019-03-12 18:33:32 +01:00
repo: https://github.com/turt2live/matrix-appservice-webhooks.git
dest: /var/local/matrix-appservice-webhooks/matrix-appservice-webhooks
version: master
become: true
become_user: matrix-appservice-webhooks
# Setup dependencies
- name: Install matrix-appservice-webhooks dependencies
npm:
path: /var/local/matrix-appservice-webhooks/matrix-appservice-webhooks
production: true
become: true
become_user: matrix-appservice-webhooks
register: npm_result
retries: 3
until: npm_result is succeeded
# Configure
- name: Configure matrix-appservice-webhooks
template:
src: config.yaml.j2
dest: /var/local/matrix-appservice-webhooks/matrix-appservice-webhooks/config/config.yaml
owner: matrix-appservice-webhooks
group: matrix-appservice-webhooks
mode: 0600
# Service file
- name: Install matrix-appservice-webhooks systemd unit
template:
src: systemd/matrix-appservice-webhooks.service.j2
dest: /etc/systemd/system/matrix-appservice-webhooks.service
owner: root
group: root
mode: 0644
notify: Reload systemd daemons
2019-03-12 18:33:32 +01:00
# TODO
# node index.js -r -u "http://localhost:9000" -c config/config.yaml
2019-03-12 19:58:55 +01:00
# cp /var/local/matrix-appservice-webhooks/matrix-appservice-webhooks/appservice-registration-webhooks.yaml
# > /etc/matrix-synapse/appservice-registration-webhooks.yaml
2019-03-12 18:33:32 +01:00
# chown matrix-synapse:nogroup /etc/matrix-synapse/appservice-registration-webhooks.yaml 440
# /etc/matrix-synapse/conf.d/app_service_config_files.yaml
# Run
#- name: Ensure that matrix-appservice-webhooks is started
# service:
# name: matrix-appservice-webhooks
# state: started
# enabled: true