tls_signed.yml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. ---
  2. - name: define signed certificate path
  3. ansible.builtin.set_fact:
  4. nextcloud_tls_cert_file: "{{ nextcloud_tls_cert | default(\"/etc/ssl/\" + nextcloud_instance_name + \".crt\") }}"
  5. - name: define signed certificate's key path
  6. ansible.builtin.set_fact:
  7. nextcloud_tls_cert_key_file: "{{ nextcloud_tls_cert_key | default(\"/etc/ssl/\" + nextcloud_instance_name + \".key\") }}"
  8. - name: "[SIGNED TLS] - Certificate is on the host"
  9. ansible.builtin.copy:
  10. dest: "{{ nextcloud_tls_cert_file }}"
  11. src: "{{ nextcloud_tls_src_cert }}"
  12. mode: 0640
  13. - name: "[SIGNED TLS] - Key is on the host"
  14. ansible.builtin.copy:
  15. dest: "{{ nextcloud_tls_cert_key_file }}"
  16. src: "{{ nextcloud_tls_src_cert_key }}"
  17. mode: 0640
  18. - name: "[SIGNED TLS] - check TLS certificate permissions"
  19. ansible.builtin.file:
  20. path: "{{ nextcloud_tls_cert_file }}"
  21. mode: 0644
  22. group: "{{ nextcloud_websrv_group }}"
  23. - name: "[SIGNED TLS] - check TLS key permissions"
  24. ansible.builtin.file:
  25. path: "{{ nextcloud_tls_cert_key_file }}"
  26. mode: 0640
  27. group: "{{ nextcloud_websrv_group }}"