From b3e8f48d717a4fc046d91dd54df1d9b17177b3a3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 29 Aug 2023 21:04:54 +0200 Subject: apt_repo: run apt update on key changes as well --- roles/apt_repo/tasks/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'roles/apt_repo/tasks/main.yml') diff --git a/roles/apt_repo/tasks/main.yml b/roles/apt_repo/tasks/main.yml index b6779fd..3e87d38 100644 --- a/roles/apt_repo/tasks/main.yml +++ b/roles/apt_repo/tasks/main.yml @@ -18,6 +18,7 @@ url: '{{ apt_repo_key_url }}' dest: '{{ key_path }}' mode: '644' + notify: apt_repo_update - name: Get host distro ansible.builtin.setup: @@ -33,9 +34,7 @@ owner: root group: root mode: '644' - register: repo_file + notify: apt_repo_update - - name: Refresh apt repositories - ansible.builtin.apt: - update_cache: true - when: repo_file.changed + - name: Refresh apt repositories if necessary + ansible.builtin.meta: flush_handlers -- cgit v1.2.3