From 390c765d2543ec5f5735bda75d27f8782cd098f3 Mon Sep 17 00:00:00 2001 From: SebClem Date: Thu, 29 Dec 2022 16:21:21 +0100 Subject: [PATCH] Fix --- handlers/clean_cache.yml | 12 ------------ handlers/main.yml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) delete mode 100644 handlers/clean_cache.yml diff --git a/handlers/clean_cache.yml b/handlers/clean_cache.yml deleted file mode 100644 index 401a1df..0000000 --- a/handlers/clean_cache.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Clean cache - ansible.builtin.file: - state: absent - path: "~{{ user.username }}/.cache/antidote/" - listen: "clean antidote" - -- name: Remove .zsh_plugins.zsh - ansible.builtin.file: - state: absent - path: "~{{ user.username }}/.zsh_plugins.zsh" - listen: "clean antidote" diff --git a/handlers/main.yml b/handlers/main.yml index 10756dc..cedf102 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,21 @@ --- # handlers file for Ansible-Antidote-Role +- name: Clean cache + ansible.builtin.file: + state: absent + path: "~{{ user.username }}/.cache/antidote/" + loop: "{{ antidote_users }}" + loop_control: + loop_var: user + label: "{{ user.username }}" + listen: "clean antidote" + +- name: Remove .zsh_plugins.zsh + ansible.builtin.file: + state: absent + path: "~{{ user.username }}/.zsh_plugins.zsh" + loop: "{{ antidote_users }}" + loop_control: + loop_var: user + label: "{{ user.username }}" + listen: "clean antidote"