74 lines
4.4 KiB
Plaintext
Raw Normal View History

2021-12-01 19:13:34 +01:00
{% for cert in letsencrypt_certs | default([]) %}
2022-04-01 11:00:09 +02:00
# letsencrypt_certs
2021-12-01 19:13:34 +01:00
{{ cert.common_name }} {{ cert.alt_names | default([]) | join(' ') }}
{% endfor %}
2022-04-01 11:00:09 +02:00
{% if 'nginx' in ansible_role_names and nginx_auto_letsencrypt_cert is defined and nginx_auto_letsencrypt_cert and nginx_vhosts is defined %}
2021-12-01 19:13:34 +01:00
{% for vhost in nginx_vhosts %}
{% 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')) %}
2022-04-01 11:00:09 +02:00
# nginx
2021-12-01 19:13:34 +01:00
{{ vhost.name }} {{ vhost.aliases | default([]) | join(' ') }}
{% endif %}
{% endfor %}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# pve
2021-12-01 19:13:34 +01:00
{{ inventory_hostname }} {{ pve_cluster_vhosts | join(' ') }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# graylog
2021-12-01 19:13:34 +01:00
{{ graylog_letsencrypt_cert }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# zcs
2021-12-01 19:13:34 +01:00
{{ inventory_hostname }} {{ zcs_vhosts | default([]) | join(' ') }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# vaultwarden
2022-02-23 21:00:08 +01:00
{{ vaultwarden_public_url | urlsplit('hostname') }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% if 'psono' in ansible_role_names and psono_letsencrypt_cert is defined and psono_letsencrypt_cert == True %}
# psono
2021-12-01 19:13:34 +01:00
{{ psono_public_url | urlsplit('hostname') }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% if 'jitsi' in ansible_role_names and jitsi_letsencrypt_cert is defined and jitsi_letsencrypt_cert == True and jitsi_domain is defined %}
# jitsi
2021-12-01 19:13:34 +01:00
{{ jitsi_domain }} auth.{{ jitsi_domain }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# turn
2021-12-01 19:13:34 +01:00
{{ turn_letsencrypt_cert }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% if 'rabbitmq_server' in ansible_role_names and rabbitmq_letsencrypt_cert is defined and rabbitmq_letsencrypt_cert != False %}
2021-12-01 19:13:34 +01:00
{% if rabbitmq_letsencrypt_cert is string and rabbitmq_letsencrypt_cert not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
2022-04-01 11:00:09 +02:00
# rabbitmq
2021-12-01 19:13:34 +01:00
{{ rabbitmq_letsencrypt_cert }}
{% elif rabbitmq_letsencrypt_cert == True and inventory_hostname not in letsencrypt_certs | default([]) | map(attribute='common_name') %}
2022-04-01 11:00:09 +02:00
# rabbitmq
2021-12-01 19:13:34 +01:00
{{ inventory_hostname }}
{% endif %}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# pbs
2021-12-01 19:13:34 +01:00
{{ pbs_letsencrypt_cert }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# fpbx
2022-02-24 11:00:05 +01:00
{{ fpbx_letsencrypt_cert }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% if 'sftpgo' in ansible_role_names and sftpgo_extra_conf is defined %}
2022-03-04 18:00:06 +01:00
{% 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') %}
2022-04-01 11:00:09 +02:00
# sftpgo {{ sftpgo_extra_conf[service].certificate_file }}
2022-03-04 18:00:06 +01:00
{{ sftpgo_extra_conf[service].certificate_file | regex_replace('^letsencrypt:','') }}
{% endif %}
{% endfor %}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# pg
2022-03-18 15:00:07 +01:00
{{ pg_letsencrypt_cert }}
{% endif %}
2022-04-01 11:00:09 +02:00
{% 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') %}
# mysql
2022-03-19 19:00:07 +01:00
{{ mysql_letsencrypt_cert }}
{% endif %}