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.

23 lines
556 B

  1. ---
  2. - name: Install packages needed by Ansible community plugins
  3. pip:
  4. executable: pip3
  5. name: cryptography
  6. - name: Create directory for certificate
  7. file:
  8. path: "{{ ssl_cert_dir }}"
  9. state: directory
  10. mode: 0755
  11. - name: Create a private key
  12. community.crypto.openssl_privatekey:
  13. path: "{{ ssl_private_key_path }}"
  14. - name: Create a self-signed certificate
  15. community.crypto.x509_certificate:
  16. path: "{{ ssl_cert_path }}"
  17. privatekey_path: "{{ ssl_private_key_path }}"
  18. provider: selfsigned
  19. notify:
  20. - Reload nginx