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