From 170ba6d418b7dc4676ea71678dd661da60e726d0 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 29 Sep 2019 16:28:11 +0200 Subject: deploy: add pogojig --- setup_webserver.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'setup_webserver.yml') diff --git a/setup_webserver.yml b/setup_webserver.yml index ea821d8..671a699 100644 --- a/setup_webserver.yml +++ b/setup_webserver.yml @@ -9,13 +9,17 @@ groups: uwsgi append: yes -- name: Create blog.jaseg.net content dir +- name: Create subdomain content dirs file: - path: /var/www/blog.jaseg.net + path: /var/www/{{item}} state: directory owner: nginx group: nginx mode: 0550 + loop: + - blog.jaseg.net + - tracespace.jaseg.net + - openjscad.jaseg.net - name: Copy uwsgi systemd socket config copy: @@ -38,15 +42,16 @@ enabled: yes state: restarted -- name: Create letsencrypt certificate for gerbolyze.jaseg.net - command: certbot --nginx certonly -d gerbolyze.jaseg.net -n --agree-tos --email gerboweb@jaseg.net +- name: Create subdomain letsencrypt certificates + command: certbot --nginx certonly -d {{item}} -n --agree-tos --email {{item}}-letsencrypt@jaseg.net args: - creates: /etc/letsencrypt/live/gerbolyze.jaseg.net/fullchain.pem - -- name: Create letsencrypt certificate for blog.jaseg.net - command: certbot --nginx certonly -d blog.jaseg.net -n --agree-tos --email blog@jaseg.net - args: - creates: /etc/letsencrypt/live/blog.jaseg.net/fullchain.pem + creates: /etc/letsencrypt/live/{{item}}/fullchain.pem + loop: + - blog.jaseg.net + - gerbolyze.jaseg.net + - tracespace.jaseg.net + - openjscad.jaseg.net + - pogojig.jaseg.net - name: Copy final nginx config copy: -- cgit