2019-03-10 11:50:07 +01:00
|
|
|
---
|
|
|
|
# Install APT dependencies
|
|
|
|
- include_tasks: 0_apt_dependencies.yml
|
|
|
|
|
|
|
|
# Create matrix-appservice-irc user and group
|
|
|
|
- include_tasks: 1_user_group.yml
|
|
|
|
|
|
|
|
- name: Clone matrix-appservice-irc project
|
|
|
|
git:
|
|
|
|
repo: https://github.com/matrix-org/matrix-appservice-irc.git
|
|
|
|
dest: /var/local/matrix-appservice-irc/matrix-appservice-irc
|
|
|
|
version: 0.11.2
|
|
|
|
become: true
|
|
|
|
become_user: matrix-appservice-irc
|
|
|
|
|
|
|
|
# Setup dependencies
|
2019-03-11 17:44:42 +01:00
|
|
|
- name: Install matrix-appservice-irc dependencies
|
|
|
|
npm:
|
|
|
|
path: /var/local/matrix-appservice-irc/matrix-appservice-irc
|
|
|
|
production: true
|
2019-03-10 11:50:07 +01:00
|
|
|
become: true
|
|
|
|
become_user: matrix-appservice-irc
|
2019-03-11 18:12:55 +01:00
|
|
|
register: npm_result
|
|
|
|
retries: 3
|
|
|
|
until: npm_result is succeeded
|
2019-03-10 11:50:07 +01:00
|
|
|
|
|
|
|
# Configure
|
|
|
|
- name: Configure matrix-appservice-irc
|
|
|
|
template:
|
|
|
|
src: config.yaml.j2
|
|
|
|
dest: /var/local/matrix-appservice-irc/matrix-appservice-irc/config.yaml
|
|
|
|
owner: matrix-appservice-irc
|
|
|
|
group: matrix-appservice-irc
|
|
|
|
mode: 0600
|
|
|
|
|
|
|
|
# Service file
|
|
|
|
- name: Install matrix-appservice-irc systemd unit
|
|
|
|
template:
|
|
|
|
src: 'systemd/matrix-appservice-irc.service.j2'
|
|
|
|
dest: '/etc/systemd/system/matrix-appservice-irc.service'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: Reload systemd daemons
|
|
|
|
|
|
|
|
# Run
|
|
|
|
#- name: Ensure that matrix-appservice-irc is started
|
|
|
|
# service:
|
|
|
|
# name: matrix-appservice-irc
|
|
|
|
# state: started
|
|
|
|
# enabled: true
|