Commit 27876b14 authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

update when to handle undefined

parent 265dee69
......@@ -29,14 +29,14 @@
msg: "set variable if some vhost has ssl defined"
with_items: "{{ apache_vhosts }}"
register: "apache_vhost_has_ssl_certbot"
when: "item.ssl is defined and (item.ssl_type =='letsencrypt' or item.ssl_type is undefined)"
when: "item.ssl | default (false) | bool and (item.ssl_type is undefined or item.ssl_type =='letsencrypt')"
- name: "Register if any hosts has ssl for digicert / uib"
debug:
msg: "set variable if some vhost has ssl defined"
with_items: "{{ apache_vhosts }}"
register: "apache_vhost_has_ssl_digicert"
when: "item.ssl is defined and item.ssl_type =='uib'"
when: "item.ssl | default (false) | bool and item.ssl_type is defined and item.ssl_type =='uib'"
- name: "debug"
debug:
......
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