summaryrefslogtreecommitdiffstats
path: root/roles/wiki/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/wiki/tasks')
-rw-r--r--roles/wiki/tasks/main.yml24
1 files changed, 5 insertions, 19 deletions
diff --git a/roles/wiki/tasks/main.yml b/roles/wiki/tasks/main.yml
index 22a5831..763f99a 100644
--- a/roles/wiki/tasks/main.yml
+++ b/roles/wiki/tasks/main.yml
@@ -65,26 +65,12 @@
- meta: flush_handlers
-- name: Generate a private key and a X.509 certificate for Nginx
- command: genkeypair.sh x509
- --pubkey=/etc/nginx/ssl/fripost.org.pem
- --privkey=/etc/nginx/ssl/fripost.org.key
- --ou=WWW --cn=fripost.org --dns=fripost.org --dns=wiki.fripost.org
- -t rsa -b 4096 -h sha512
- register: r1
- changed_when: r1.rc == 0
- failed_when: r1.rc > 1
- notify:
- - Restart Nginx
- tags:
- - genkey
-
- name: Copy /etc/nginx/sites-available/{wiki,website}
copy: src=etc/nginx/sites-available/{{ item }}
dest=/etc/nginx/sites-available/{{ item }}
owner=root group=root
mode=0644
- register: r2
+ register: r1
with_items:
- website
- wiki
@@ -96,7 +82,7 @@
dest=/etc/nginx/sites-enabled/{{ item }}
owner=root group=root
state=link force=yes
- register: r3
+ register: r2
with_items:
- website
- wiki
@@ -105,15 +91,15 @@
- name: Start Nginx
service: name=nginx state=started
- when: not (r1.changed or r2.changed or r3.changed)
+ when: not (r1.changed or r2.changed)
- meta: flush_handlers
- name: Fetch Nginx's X.509 certificate
# Ensure we don't fetch private data
sudo: False
- fetch: src=/etc/nginx/ssl/fripost.org.pem
- dest=certs/public/
+ fetch: src=/etc/nginx/ssl/www.fripost.org.pem
+ dest=certs/public/fripost.org.pem
fail_on_missing=yes
flat=yes
tags: