This commit is contained in:
Lars Hahn 2024-11-27 22:34:45 +01:00
parent 4cd677e01c
commit f7be80008a
3 changed files with 16 additions and 16 deletions

View File

@ -10,12 +10,12 @@
register: certbot_nginx_installation
- name: create letsencrypt account
command:
command:
cmd: |
certbot register
-m {{ letsencrypt_mail_address }}
--agree-tos
--noninteractive
-m {{ letsencrypt_mail_address }}
--agree-tos
--noninteractive
--redirect
when: certbot_nginx_installation.changed
@ -31,12 +31,12 @@
- name: create let's-encrypt certificates for web web_sites
command:
cmd: |
certbot
--nginx
-d {% if cert_domain is not string and cert_domain is iterable %}{{ cert_domain | join(',') }}{% else %}{{ cert_domain }}{% endif %}
-m {{ letsencrypt_mail_address }}
--agree-tos
--noninteractive
certbot
--nginx
-d {% if cert_domain is not string and cert_domain is iterable %}{{ cert_domain | join(',') }}{% else %}{{ cert_domain }}{% endif %}
-m {{ letsencrypt_mail_address }}
--agree-tos
--noninteractive
--redirect
creates: "/etc/letsencrypt/live/{% if cert_domain is not string and cert_domain is iterable %}{{ cert_domain[0] }}{% else %}{{ cert_domain }}{% endif %}"
loop: "{{ web_sites | json_query('[?letsencrypt==`true`&&state==`present`].domain') }}"

View File

@ -64,22 +64,22 @@ http {
### Ansible included configs ###
{% for http_conf in nginx_conf_http %}
{{ http_conf | indent(width=4, first=False) }}
{% endfor %}
{% endfor %}
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
#
# server {
# listen localhost:143;
# protocol imap;
@ -93,4 +93,4 @@ stream {
{% for conf in nginx_conf %}
{{ conf }}
{% endfor %}
{% endfor %}

View File

@ -4,7 +4,7 @@
server {
{% if website.domain is iterable and (website.domain is not mapping and website.domain is not string) %}
server_name {{ website.domain | join(' ') }};
{% else %}
server_name {{ website.domain }};
{% endif %}