Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ssl.yml 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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'
  16. - name: Enable Apache SOCACHE_SHMCB module for the SSL stapling cache
  17. command: a2enmod socache_shmcb
  18. creates=/etc/apache2/mods-enabled/socache_shmcb.load
  19. notify: restart apache
  20. when: ansible_distribution_release != 'wheezy'
  21. - name: Add Apache SSL stapling cache configuration
  22. copy:
  23. src=etc_apache2_conf-available_ssl-stapling-cache.conf
  24. dest=/etc/apache2/conf-available/ssl-stapling-cache.conf
  25. owner=root
  26. group=root
  27. when: ansible_distribution_release != 'wheezy'
  28. notify: restart apache
  29. - name: Enable Apache SSL stapling cache configuration
  30. command: a2enconf ssl-stapling-cache
  31. creates=/etc/apache2/conf-enabled/ssl-stapling-cache.conf
  32. when: ansible_distribution_release != 'wheezy'
  33. notify: restart apache
  34. - name: Add common Apache SSL config
  35. template:
  36. src=etc_apache2_ssl.conf.j2
  37. dest=/etc/apache2/ssl.conf
  38. owner=root
  39. group=root