diff --git a/branding/tasks/main.yml b/branding/tasks/main.yml
index b7d44b2ecfeaaf895aa8db13bdcad98bc5d065f4..ce6e91648910766e854e7fbbbcd2ba26ea8cacf8 100644
--- a/branding/tasks/main.yml
+++ b/branding/tasks/main.yml
@@ -49,6 +49,7 @@
     group: staff
     mode: '02775'
     recurse: true
+  when: branding_cacerts is defined
   tags:
     - branding
     - tls
@@ -60,7 +61,7 @@
     owner: root
     group: root
     mode: '0644'
-  with_items: "{{ branding_cacerts }}"
+  loop: "{{ branding_cacerts }}"
   when: branding_cacerts is defined
   notify: update CA certificates
   tags:
@@ -72,7 +73,7 @@
     path: "/etc/ssl/certs/{{ item }}"
     state: absent
   notify: update CA certificates
-  with_items:
+  loop:
     - rwth_chain.pem
     - rwth_chain_g2.pem
     - asta_ca.pem