diff --git a/tasks/main.yml b/tasks/main.yml
index af289dbbc900c64973fb1d0fad022d40aadb02ed..67be48a866ba214be663d869c7108c4b33652f7b 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -30,6 +30,7 @@
     mode: 0644
 
 - name: Create the SASL password lookup table
+  when: postfix__tables.sasl_passwd is defined and postfix__tables.sasl_passwd
   template:
     src: lookup_table.j2
     dest: /etc/postfix/sasl_passwd.in
@@ -41,6 +42,7 @@
   notify: ['make postfix sasl_passwd.db']
 
 - name: Create the transport lookup table
+  when: postfix__tables.transport is defined and postfix__tables.transport
   template:
     src: lookup_table.j2
     dest: /etc/postfix/transport.in