説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ssl.yml 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. register: private_key
  4. notify: restart apache
  5. - name: Copy SSL public certificate into place
  6. copy: src=wildcard_public_cert.crt dest=/etc/ssl/certs/wildcard_public_cert.crt group=root owner=root mode=644
  7. register: certificate
  8. notify: restart apache
  9. - name: Copy CA combined certificate into place
  10. copy: src=wildcard_ca.pem dest=/etc/ssl/certs/wildcard_ca.pem group=root owner=root mode=644
  11. register: ca_certificate
  12. notify: restart apache
  13. - name: Create a combined version of the public cert with intermediate and root CAs
  14. shell: cat /etc/ssl/certs/wildcard_public_cert.crt /etc/ssl/certs/wildcard_ca.pem >
  15. /etc/ssl/certs/wildcard_combined.pem
  16. when: private_key.changed or certificate.changed or ca_certificate.changed
  17. - name: Set permissions on combined public cert
  18. file: name=/etc/ssl/certs/wildcard_combined.pem mode=644
  19. notify: restart apache
  20. - name: Create strong Diffie-Hellman group
  21. command: openssl dhparam -out /etc/ssl/private/dhparam2048.pem 2048
  22. creates=/etc/ssl/private/dhparam2048.pem
  23. - name: Enable Apache SSL module
  24. command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
  25. notify: restart apache
  26. - name: Enable NameVirtualHost for HTTPS
  27. lineinfile:
  28. dest=/etc/apache2/ports.conf regexp='^ NameVirtualHost \*:443'
  29. insertafter='^<IfModule mod_ssl.c>'
  30. line=' NameVirtualHost *:443'
  31. notify: restart apache
  32. - name: Enable Apache SOCACHE_SHMCB module for the SSL stapling cache
  33. command: a2enmod socache_shmcb
  34. creates=/etc/apache2/mods-enabled/socache_shmcb.load
  35. notify: restart apache
  36. - name: Add common Apache SSL config
  37. copy: src=etc_apache2_conf-available_ssl.conf
  38. dest=/etc/apache2/conf-available/ssl.conf
  39. owner=root
  40. group=root
  41. notify: restart apache
  42. - name: Enable Apache SSL config
  43. command: a2enconf ssl creates=/etc/apache2/conf-enabled/ssl.conf
  44. notify: restart apache