From cc375e74ee2e67845ee52e7521ced696b0e8cf74 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 3 Aug 2018 17:18:02 +0200 Subject: [PATCH] Fix the key directory permissions. --- ubuntu-deb-general/tasks/pki-basics.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ubuntu-deb-general/tasks/pki-basics.yml b/ubuntu-deb-general/tasks/pki-basics.yml index c1e3379d..765acb51 100644 --- a/ubuntu-deb-general/tasks/pki-basics.yml +++ b/ubuntu-deb-general/tasks/pki-basics.yml @@ -19,7 +19,17 @@ with_items: - '{{ letsencrypt_acme_user_home | default(omit) }}/live' - '{{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert' - - '{{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert' + when: + - true_cert is defined + - true_cert.stat is defined + - ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install ) + - letsencrypt_acme_user_home | default(omit) is defined + tags: [ 'pki', 'ssl', 'letsencrypt' ] + +- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the physical paths + file: path={{ item }} mode=0700 state=directory + with_items: + - '{{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert' when: - true_cert is defined - true_cert.stat is defined