Commit 664d0062 authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

only send email if new csr is created

parent f345de55
......@@ -54,6 +54,7 @@
common_name: "{{ item.servername }}"
loop: "{{ apache_vhosts }}"
when: "item.ssl_type | default('certbot')== 'uib'"
register: "apache_csr_result"
- name: "send csr file by mail"
mail:
......@@ -62,7 +63,7 @@
attach:
- "{{ apache_digicert_uib_home }}/csr/{{ item.servername }}.csr"
loop: "{{ apache_vhosts }}"
when: "item.ssl_type | default('certbot')== 'uib'"
when: "item.ssl_type | default('certbot')== 'uib' and apache_csr_result.changed | bool"
#- name: "get certificate url from ITA"
# prompt_vars:
......
Supports Markdown
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