summaryrefslogtreecommitdiffstats
path: root/roles/letsencrypt/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/letsencrypt/tasks')
-rw-r--r--roles/letsencrypt/tasks/main.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/letsencrypt/tasks/main.yml b/roles/letsencrypt/tasks/main.yml
new file mode 100644
index 0000000..c7ef7ef
--- /dev/null
+++ b/roles/letsencrypt/tasks/main.yml
@@ -0,0 +1,37 @@
+- name: Install dependencies for letsencrypt-tiny
+ apt: pkg={{ item }}
+ with_items:
+ - libjson-perl
+ - libjson-xs-perl
+ - libconfig-tiny-perl
+ - libwww-perl
+ - liblwp-protocol-https-perl
+ - libnet-ssleay-perl
+
+- name: Copy LetsEncrypt's ACME client
+ copy: src=deb/letsencrypt-tiny_0.1-1_all.deb
+ dest=/tmp
+ notify: Install LetsEncrypt's ACME client
+
+- meta: flush_handlers
+
+- name: Create a user 'letsencrypt'
+ user: name=letsencrypt system=yes
+ group=nogroup
+ createhome=no
+ home=/nonexistent
+ shell=/usr/sbin/nologin
+ password=!
+ state=present
+
+- name: Copy letsencrypt-tiny/letsencrypt-certs.conf
+ copy: src=etc/letsencrypt-tiny/letsencrypt.conf
+ dest=/etc/letsencrypt-tiny/letsencrypt.conf
+ owner=root group=root
+ mode=0644
+
+- name: Copy letsencrypt-tiny/letsencrypt-certs.conf
+ template: src=etc/letsencrypt-tiny/letsencrypt-certs.conf.j2
+ dest=/etc/letsencrypt-tiny/letsencrypt-certs.conf
+ owner=root group=root
+ mode=0644