diff --git a/tasks/configuration.yml b/tasks/configuration.yml index e024aa2..0a5e94b 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -43,7 +43,9 @@ mode: u=rw,g=,o= src: "{{ item.src }}" dest: "{{ item.dest }}" - when: fail2ban_templates | length > 0 + when: + - fail2ban_templates | length > 0 + - item.src is exists loop: "{{ fail2ban_templates }}" loop_control: label: "{{ item.dest }}"