From 52d5e540c0d8d59d8b44393b0bb7a49af29b8086 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 2 Feb 2019 17:32:13 +0200 Subject: [PATCH] Fix ownership of generated self-signed certificates (root -> matrix) --- .../tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml b/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml index 0e6908346..80838fa67 100644 --- a/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml +++ b/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml @@ -37,4 +37,6 @@ -keyout {{ matrix_ssl_certificate_cert_key_path }} \ -out {{ matrix_ssl_certificate_cert_path }} \ -days 3650 - when: "not matrix_ssl_certificate_cert_path_stat_result.stat.exists" \ No newline at end of file + become: true + become_user: "{{ matrix_user_username }}" + when: "not matrix_ssl_certificate_cert_path_stat_result.stat.exists"