summaryrefslogtreecommitdiff
path: root/roles/sslcert-self-signed/tasks/main.yml
blob: 9139c6a6966cec1a9893e8cb90627e3f3f3e1da9 (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=0600
- name: Set permissions on certificate key
  file: path={{ssl_key}} mode=0600