2021-07-20 01:10:12 +00:00
|
|
|
- hosts: all
|
2021-07-15 14:50:13 +00:00
|
|
|
remote_user: root
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: check for ssl cert
|
|
|
|
stat:
|
|
|
|
path: /home/ircd/ircd/etc/ssl.pem
|
|
|
|
register: ssl_exists
|
|
|
|
|
|
|
|
- name: get ssl fingerprint
|
|
|
|
command: /home/ircd/ircd/bin/solanum-mkfingerprint sha512 /home/ircd/ircd/etc/ssl.pem
|
|
|
|
register: ssl_fingerprint
|
|
|
|
when: ssl_exists.stat.exists
|
|
|
|
|
|
|
|
- name: create ircd.conf
|
|
|
|
template:
|
|
|
|
src: ircd.j2
|
|
|
|
dest: /home/ircd/ircd/etc/ircd.conf
|
|
|
|
|
|
|
|
- name: create ircd.motd
|
|
|
|
template:
|
|
|
|
src: motd.j2
|
|
|
|
dest: /home/ircd/ircd/etc/ircd.motd
|
|
|
|
|
2021-10-29 21:02:50 +00:00
|
|
|
- name: copy oper CHALLENGE keys
|
|
|
|
copy:
|
|
|
|
src: challenge/
|
|
|
|
dest: /home/ircd/ircd/challenge/
|
|
|
|
|
2021-07-15 14:50:13 +00:00
|
|
|
- name: create openrc service
|
|
|
|
template:
|
|
|
|
src: openrc.j2
|
|
|
|
dest: /etc/init.d/solanum
|
|
|
|
mode: 0755
|
|
|
|
when: ansible_distribution == 'Alpine'
|
|
|
|
|
|
|
|
- name: create systemd service
|
|
|
|
template:
|
|
|
|
src: systemd.j2
|
2022-03-29 00:13:05 +00:00
|
|
|
dest: /etc/systemd/system/solanum.service
|
2021-07-15 14:50:13 +00:00
|
|
|
mode: 0755
|
|
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
|
|
|
|
- name: enable service
|
|
|
|
service:
|
|
|
|
name: solanum
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2022-03-05 20:24:13 +00:00
|
|
|
ignore_errors: yes
|
2021-07-15 14:50:13 +00:00
|
|
|
|
|
|
|
- name: reload solanum
|
|
|
|
command: killall -1 solanum
|