Kapisi/roles/IRC/tasks/web.yml

59 lines
1.1 KiB
YAML
Raw Permalink Normal View History

---
- name: Clone KiwiIRC
become: yes
git:
repo: https://github.com/prawnsalad/KiwiIRC.git
dest: /usr/local/src/KiwiIRC
update: no
# Need to capture AniNIX skinning of client as well as client build process.
- name: Update permissions
become: yes
file:
path: /usr/local/src/KiwiIRC
recurse: yes
owner: ircd
group: ircd
- name: Populate config
become: yes
register: config
template:
src: kiwiirc/config.js.j2
dest: /usr/local/src/KiwiIRC/config.js
owner: ircd
group: ircd
mode: 0600
- name: Copy service file
become: yes
register: servicesfile
copy:
src: services/ircweb.service
dest: /usr/lib/systemd/system/ircweb.service
owner: root
group: root
mode: 0644
- name: Reload services
when: servicesfile.changed
become: yes
systemd:
daemon_reload: true
- name: Ensure service running
become: yes
service:
name: ircweb
state: started
enabled: yes
- name: Reload on config change
become: yes
when: config.changed or servicesfile.changed
service:
name: ircweb
state: reloaded