summaryrefslogtreecommitdiff
path: root/roles/sublab_web/tasks
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2015-08-26 23:50:03 +0200
committerChristian Franke <nobody@nowhere.ws>2015-08-26 23:50:03 +0200
commita04a8444ec42babd3a91727a496613c727f358f3 (patch)
tree9f243a1c400af0c1d2ac454058fc4d06628107ec /roles/sublab_web/tasks
parent037b2539fdd6de92cdf9f0846476393af3590dd8 (diff)
Push ssl certificates
Diffstat (limited to 'roles/sublab_web/tasks')
-rw-r--r--roles/sublab_web/tasks/main.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/sublab_web/tasks/main.yaml b/roles/sublab_web/tasks/main.yaml
index fcfc7cb..50a2585 100644
--- a/roles/sublab_web/tasks/main.yaml
+++ b/roles/sublab_web/tasks/main.yaml
@@ -31,6 +31,27 @@
- wiki.conf
notify: Reload apache
+- name: Create SSL DIR
+ file:
+ path=/etc/apache2/sites/{{ sublab_web_server_name }}/ssl
+ state=directory
+
+- name: Place SSL cert and chain
+ copy:
+ src=ssl/{{ sublab_web_server_name }}/{{item}}
+ dest=/etc/apache2/sites/{{ sublab_web_server_name }}/ssl/{{item}}
+ with_items:
+ - cert.pem
+ - chain.pem
+ notify: Reload apache
+
+- name: Place SSL key
+ copy:
+ content="{{ssl_keys[sublab_web_server_name]}}"
+ dest="/etc/apache2/sites/{{sublab_web_server_name}}/ssl/key.pem"
+ mode=0600
+ notify: Reload apache
+
- name: Create Website group
group: name=sublab_web