correction sftp
[lhc/ansible.git] / creation_nouveau_site.yml
index 5f7712e..c5ca22c 100644 (file)
@@ -78,7 +78,7 @@
 
         - name: Générer un certififat avec certbot # noqa : command-instead-of-module
           become: true
-          ansible.builtin.command: 'certbot certonly -n --nginx -d {{ SITE }}.{{ DOMAIN }}.{{ TLD }}'
+          ansible.builtin.command: 'certbot certonly -n --nginx -d {{ config_ss_domain | default(SITE) }}.{{ DOMAIN }}.{{ TLD }}'
           register: certbot_log
           ignore_errors: true
           changed_when: false
 
     - name: Inclure le configuration SFTP
       ansible.builtin.include_tasks: tasks/config_sftp.yml
-      when: sftp == 'oui'
+      when: sftp_key =! '' and sftp_key =! 'non'