Commit 70b2c00a authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

add optional certalias list, for certificates in other vhosts

parent 8b95da9b
......@@ -35,10 +35,10 @@
become: true
- name: "run command to get certificate"
command: "certbot --apache certonly {{ certbot_ssl_dry_run }} --non-interactive --agree-tos --email {{ item.serveradmin }} -d {%if item.serveralias is defined %} {{ [item.servername, item.serveralias ] | join(',') }} {% else %} {{ item.servername }} {% endif %}" # noqa 204
command: "certbot --apache certonly {{ certbot_ssl_dry_run }} --non-interactive --agree-tos --email {{ item.serveradmin }} -d {%if item.serveralias is defined %} {{ [item.servername, item.serveralias , item.certalias | default(omit) ] | join(',') }} {% else %} {{ item.servername }} {% endif %}" # noqa 204
with_items: "{{ apache_vhosts }}"
become: true
when: "apache_certbot and not letsencrypt_cert.stat.exists and item.ssl is defined and item.ssl"
when: "(apache_certbot and not letsencrypt_cert.stat.exists and item.ssl is defined and item.ssl | bool) or (item.ssl_force | bool and (item.ssl_type == 'certbot' or item.ssl_type is undefined))"
- name: "delete temp file from server"
file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment