diff --git a/tasks/config.yml b/tasks/config.yml index 4a22b7fa930b5229069da23a0509c51bc4cb29a1..aae0e946d118519dfbb038f88bc8d3f2760f3620 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -101,7 +101,7 @@ common_name: "{{ inventory_hostname }}" when: - - ( "md" not in apache_mods_enabled ) or ( not apache_cert.stat.exists ) + - ( "md" not in apache_mods_enabled ) or ( apache_cert is defined and not apache_cert.stat.exists ) - ( "ssl" in apache_mods_enabled ) - ( "le" in apache_conf_enabled ) - ( common_name is defined ) and ( common_name == inventory_hostname )