From 68515bbb478f326a252ca688fcc97f3fdc8c4f97 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sun, 28 Aug 2016 16:08:42 +0200 Subject: Initial commit, finally got around to cleanup and make it into a gitrepo. --- roles/lets_encrypt/tasks/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/lets_encrypt/tasks/main.yml (limited to 'roles/lets_encrypt/tasks/main.yml') diff --git a/roles/lets_encrypt/tasks/main.yml b/roles/lets_encrypt/tasks/main.yml new file mode 100644 index 0000000..755f58d --- /dev/null +++ b/roles/lets_encrypt/tasks/main.yml @@ -0,0 +1,19 @@ +- name: Install lets-encrypt + become: yes + pacman: name=letsencrypt state=present update_cache=yes + +- name: stop webserver + become: yes + service: name=nginx state=stopped + ignore_errors: yes + +- name: validate domains + become: yes + command: letsencrypt certonly --standalone --email dennis@brentj.es --agree-tos {% for domain in lets_encrypt_domains %}-d {{ domain }} {% endfor %} + tags: + - production_only + +- name: start webserver + become: yes + service: name=nginx state=started + ignore_errors: yes -- cgit v1.2.3-70-g09d2