{% if vhost.ssl.cert is not defined and (vhost.ssl.letsencrypt_cert is not defined or vhost.ssl.letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name')) %}
{% if 'pve' in ansible_role_names and pve_letsencrypt is defined and pve_letsencrypt and inventory_hostname not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'graylog' in ansible_role_names and graylog_letsencrypt_cert is defined and graylog_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'zimbra' in ansible_role_names and zcs_letsencrypt is defined and zcs_letsencrypt and inventory_hostname not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'vaultwarden' in ansible_role_names and vaultwarden_letsencrypt_cert is defined and vaultwarden_letsencrypt_cert == True and vaultwarden_public_url | urlsplit('hostname') not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'coturn' in ansible_role_names and turn_letsencrypt_cert is defined and turn_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'pbs' in ansible_role_names and pbs_letsencrypt_cert is defined and pbs_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'freepbx' in ansible_role_names and fpbx_letsencrypt_cert is defined and fpbx_letsencrypt_cert is string and fpbx_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% for service in ['ftpd','webdavd','httpd','telemetry'] %}
{% if sftpgo_extra_conf[service] is defined and sftpgo_extra_conf[service].certificate_file is defined and sftpgo_extra_conf[service].certificate_file is search('^letsencrypt:') and sftpgo_extra_conf[service].certificate_file | regex_replace('^letsencrypt:','') not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'postgresql_server' in ansible_role_names and pg_letsencrypt_cert is defined and pg_letsencrypt_cert is string and pg_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'mysql_server' in ansible_role_names and mysql_letsencrypt_cert is defined and mysql_letsencrypt_cert is string and mysql_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
{% if 'vault' in ansible_role_names and vault_letsencrypt_cert is defined and vault_letsencrypt_cert is string and vault_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}