Skip to content

Commit

Permalink
fixes a bug when run crushes, because zabbix_repo tries register as v…
Browse files Browse the repository at this point in the history
…ariable, but at the same time it is a role name
  • Loading branch information
Yar committed Jul 4, 2024
1 parent 1a9f575 commit f69d342
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions roles/zabbix_repo/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit f69d342

Please sign in to comment.