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