summaryrefslogtreecommitdiff
path: root/roles/sslcert-self-signed/tasks/main.yml
blob: 1dd51d9f3bb7858e2aa3b94dd473a5b85c46abdc (plain)
1
2
3
4
5
6
7
8
9
10
11
- name: Prepare OpenSSL config
  template: src=ssleay.conf dest=/tmp/
- name: Create self-signed SSL certificate
  command: openssl req -config /tmp/ssleay.conf -new -x509 -days 3650 -nodes -out {{ssl_cert}} -keyout {{ssl_key}}
           creates={{ssl_cert}}
  notify:
      - Restart Apache
- name: Set permissions on certificate
  file: path={{ssl_cert}} mode=600
- name: Set permissions on certificate key
  file: path={{ssl_key}} mode=600