From e7133c940e87741f3063f8727e05f98af4e8ba4a Mon Sep 17 00:00:00 2001
From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de>
Date: Sat, 10 Jun 2023 14:29:35 +0200
Subject: [PATCH] branding: Small refactoring

---
 branding/tasks/main.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/branding/tasks/main.yml b/branding/tasks/main.yml
index b7d44b2..ce6e916 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
-- 
GitLab