diff --git a/tasks/create-cert-standalone.yml b/tasks/create-cert-standalone.yml index 791dff5..517f4a2 100644 --- a/tasks/create-cert-standalone.yml +++ b/tasks/create-cert-standalone.yml @@ -1,10 +1,7 @@ --- - name: Check if certificate already exists. stat: - path: >- - /etc/letsencrypt/live/{% if certbot_cert_name %}{{ certbot_cert_name }} - {% else %}{{ cert_item.domains | first | replace('*.', '') }} - {% endif %}/cert.pem + path: "/etc/letsencrypt/live/{% if certbot_cert_name %}{{ certbot_cert_name }}{% else %}{{ cert_item.domains | first | replace('*.', '') }}{% endif %}/cert.pem" register: letsencrypt_cert - name: Ensure pre and post hook folders exist. @@ -58,10 +55,5 @@ - name: create nginx config ssl file template: mode: 0750 - dest: >- - {{ certbot_nginx_conf_path }}/ - {% if certbot_cert_name %}{{ certbot_cert_name }} - {% else %} - {{ cert_item.domains | first | replace('*.', '') }} - {% endif %}.ssl" + dest: "{{ certbot_nginx_conf_path }}/{% if certbot_cert_name %}{{ certbot_cert_name }}{% else %}{{ cert_item.domains | first | replace('*.', '') }}{% endif %}.ssl" src: nginx_ssl_config.j2