Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ssl.yml 1.1KB

123456789101112131415161718192021
  1. - name: Copy SSL private key into place
  2. copy: src=wildcard_private.key dest=/etc/ssl/private/wildcard_private.key group=ssl-cert owner=root mode=640
  3. - name: Copy SSL public certificate into place
  4. copy: src=wildcard_public_cert.crt dest=/etc/ssl/certs/wildcard_public_cert.crt group=root owner=root mode=644
  5. - name: Copy CA combined certificate into place
  6. copy: src=wildcard_ca.pem dest=/etc/ssl/certs/wildcard_ca.pem group=root owner=root mode=644
  7. - name: Create a combined version of the public cert with intermediate and root CAs
  8. shell: cat /etc/ssl/certs/wildcard_public_cert.crt /etc/ssl/certs/wildcard_ca.pem >
  9. /etc/ssl/certs/wildcard_combined.pem creates=/etc/ssl/certs/wildcard_combined.pem
  10. - name: Set permissions on combined public cert
  11. file: name=/etc/ssl/certs/wildcard_combined.pem mode=644
  12. - name: Enable Apache SSL module
  13. command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
  14. - name: Enable NameVirtualHost for HTTPS
  15. lineinfile: dest=/etc/apache2/ports.conf regexp='^ NameVirtualHost \*:443' insertafter='^<IfModule mod_ssl.c>' line=' NameVirtualHost *:443'