summaryrefslogtreecommitdiff
path: root/roles/apache/tasks/ssl.yaml
blob: 979d364d0d91de6cd956db836115a0429ef538e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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