make config and solanum seperate playbooks
This commit is contained in:
parent
49d39eda86
commit
b0731b4390
2 changed files with 46 additions and 43 deletions
46
config.yml
Normal file
46
config.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
- hosts: vulpineawoo
|
||||
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
|
||||
|
||||
- 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
|
||||
dest: /etc/systemd/system/solnum.service
|
||||
mode: 0755
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: enable service
|
||||
service:
|
||||
name: solanum
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: reload solanum
|
||||
command: killall -1 solanum
|
43
solanum.yml
43
solanum.yml
|
@ -59,46 +59,3 @@
|
|||
become: yes
|
||||
become_user: ircd
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
dest: /etc/systemd/system/solnum.service
|
||||
mode: 0755
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: enable service
|
||||
service:
|
||||
name: solanum
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: reload solanum
|
||||
command: killall -1 solanum
|
||||
|
||||
|
|
Loading…
Reference in a new issue