summaryrefslogtreecommitdiff
path: root/roles/apache/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/apache/tasks')
-rw-r--r--roles/apache/tasks/ssl.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/apache/tasks/ssl.yaml b/roles/apache/tasks/ssl.yaml
new file mode 100644
index 0000000..979d364
--- /dev/null
+++ b/roles/apache/tasks/ssl.yaml
@@ -0,0 +1,21 @@
+---
+- name: Create ssl DIR
+ file:
+ path=/etc/apache2/sites/{{ ssl_server_name }}/ssl
+ state=directory
+
+- name: Place SSL cert and chain
+ copy:
+ src=ssl/{{ ssl_server_name }}/{{item}}
+ dest=/etc/apache2/sites/{{ ssl_server_name }}/ssl/{{item}}
+ with_items:
+ - cert.pem
+ - chain.pem
+ notify: Reload apache
+
+- name: Place SSL key
+ copy:
+ content="{{ssl_keys[ssl_server_name]}}"
+ dest="/etc/apache2/sites/{{ssl_server_name}}/ssl/key.pem"
+ mode=0600
+ notify: Reload apache