aboutsummaryrefslogtreecommitdiffstats
path: root/roles/znc/tasks
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-09-22 10:56:27 +0800
committerAaron LI <aly@aaronly.me>2019-09-22 11:36:12 +0800
commit551a067e37b4aaf9dce260460ce50dc69360da9d (patch)
treea6de4aac24ed1cbe5d6ff1b1dd6cb8c2bd56830e /roles/znc/tasks
parentad92886aa888b0e2c646dfe5b26ea0891b7d914f (diff)
downloadansible-dfly-vps-551a067e37b4aaf9dce260460ce50dc69360da9d.tar.bz2
znc: Update certificate deployment w.r.t. acme.sh
Diffstat (limited to 'roles/znc/tasks')
-rw-r--r--roles/znc/tasks/main.yml21
1 files changed, 16 insertions, 5 deletions
diff --git a/roles/znc/tasks/main.yml b/roles/znc/tasks/main.yml
index 93754ff..bf6ecb4 100644
--- a/roles/znc/tasks/main.yml
+++ b/roles/znc/tasks/main.yml
@@ -22,6 +22,15 @@
mode: 0600
notify: reload-znc
+- name: znc - generate SSL cert deploy script
+ template:
+ src: deploy_ssl.sh.j2
+ dest: "{{ znc.data_dir }}/deploy_ssl.sh"
+ mode: 0755
+
+- name: znc - deploy SSL cert
+ command: sh {{ znc.data_dir }}/deploy_ssl.sh
+
- name: znc - enable service
blockinfile:
path: /etc/rc.conf
@@ -31,10 +40,12 @@
znc_enable="YES"
- name: znc - start service
- command: rcstart znc
+ service:
+ name: znc
+ state: started
-- name: acme - generate deployment script
- template:
- src: acme/znc.j2
- dest: /usr/local/etc/acme/deploy.d/znc
+- name: acme - add znc to deploy
+ lineinfile:
+ path: "{{ web.acme_home }}/deploy.local.sh"
+ line: sh {{ znc.data_dir }}/deploy_ssl.sh
tags: acme