main.yml 820 B

12345678910111213141516171819202122
  1. ---
  2. # tasks file for mapserver-certificates
  3. - name: Install openssl to generate DH params
  4. apt: name=openssl state=present
  5. - name: Ensure nginx ssl directory exists
  6. file: dest=/etc/nginx/ssl/ state=directory
  7. - name: Create private ssl key from secret var
  8. copy: content="{{ mapserver_ssl_private_key }}" dest=/etc/nginx/ssl/wiki.ffdo.de.key
  9. - name: Create nginx server certificate from secret var
  10. copy: content="{{ mapserver_ssl_server_cert }}" dest=/etc/nginx/ssl/wiki.ffdo.de.crt
  11. - name: Deploy pregenerated DH params
  12. when: mapserver_use_pregenerated_dh_params
  13. copy: content="{{mapserver_dh_params}}" dest=/etc/nginx/dhparams.pem
  14. - name: Generate strong dhparams
  15. when: not mapserver_use_pregenerated_dh_params
  16. shell: openssl dhparam -out /etc/nginx/dhparams.pem 4096 creates=/etc/nginx/dhparams.pem