From f69d342e8b081895760c065a0c545161c9dd7e6b Mon Sep 17 00:00:00 2001 From: Yar Date: Thu, 4 Jul 2024 12:34:38 +0300 Subject: [PATCH] fixes a bug when run crushes, because zabbix_repo tries register as variable, but at the same time it is a role name --- roles/zabbix_repo/tasks/Debian.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/zabbix_repo/tasks/Debian.yml b/roles/zabbix_repo/tasks/Debian.yml index 54b867322..ac6e6b445 100644 --- a/roles/zabbix_repo/tasks/Debian.yml +++ b/roles/zabbix_repo/tasks/Debian.yml @@ -58,7 +58,7 @@ Components: {{ zabbix_repo_deb_component }} Architectures: {{ 'amd64' if ansible_machine != 'aarch64' else 'arm64'}} Signed-By: {{ zabbix_repo_gpg_key }} - register: zabbix_repo + register: zabbix_repo_apt_file become: true tags: - install @@ -94,6 +94,7 @@ - install - name: "Debian | Update apt cache if repo was added" - ansible.builtin.apt: update_cache=yes - when: zabbix_repo is changed + ansible.builtin.apt: + update_cache: true + when: zabbix_repo_apt_file.changed become: true