diff --git a/zabbix-repo/files/chr.gpg b/zabbix-repo/files/chr.asc similarity index 100% rename from zabbix-repo/files/chr.gpg rename to zabbix-repo/files/chr.asc diff --git a/zabbix-repo/files/zabbix.gpg b/zabbix-repo/files/zabbix.gpg index d814e63d58dc1a8fb9a823c7e4eca32f24bcc463..660c453a2cc1e110670bfd0b6aa4f81fc5353c31 100644 Binary files a/zabbix-repo/files/zabbix.gpg and b/zabbix-repo/files/zabbix.gpg differ diff --git a/zabbix-repo/handlers/main.yml b/zabbix-repo/handlers/main.yml deleted file mode 100644 index 5c02aac0c93db74491e9f53d4bfa116259d00bdb..0000000000000000000000000000000000000000 --- a/zabbix-repo/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -- name: update apt cache - apt: update_cache=true diff --git a/zabbix-repo/tasks/main.yml b/zabbix-repo/tasks/main.yml index 72183c0d7274fc0ad18caa10124c46a599d53da9..a9efe7685d00e66c99f61c70f4579f20d248edfb 100644 --- a/zabbix-repo/tasks/main.yml +++ b/zabbix-repo/tasks/main.yml @@ -3,12 +3,13 @@ # but does not mitigate package signing - name: ensure apt got the key to verify the zabbix repo - apt_key: - data: "{{ lookup('file', 'zabbix.gpg') }}" - state: present + copy: + src: zabbix.gpg + dest: /etc/apt/trusted.gpg.d/zabbix.gpg + owner: root + group: root + mode: "0644" when: zabbix_external_repo - notify: - - update apt cache tags: - repos - zabbix @@ -22,8 +23,6 @@ - 'deb http://repo.zabbix.com/zabbix/{{ old_zabbix_version }}/debian {{ debian_version }} main' # yamllint disable-line rule:line-length - 'deb-src http://repo.zabbix.com/zabbix/{{ old_zabbix_version }}/debian {{ debian_version }} main' - notify: - - update apt cache tags: - repos - zabbix @@ -38,8 +37,6 @@ - 'deb http://repo.zabbix.com/zabbix/{{ zabbix_version }}/debian {{ debian_version }} main' # yamllint disable-line rule:line-length - 'deb-src http://repo.zabbix.com/zabbix/{{ zabbix_version }}/debian {{ debian_version }} main' - notify: - - update apt cache when: - ansible_distribution == "Debian" tags: @@ -55,8 +52,6 @@ - 'deb http://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu {{ ansible_distribution_release }} main' # yamllint disable-line rule:line-length - 'deb-src http://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu {{ ansible_distribution_release }} main' - notify: - - update apt cache when: - ansible_distribution == "Ubuntu" tags: @@ -64,11 +59,12 @@ - zabbix - name: ensure chr's key is present - apt_key: - data: "{{ lookup('file', 'chr.gpg') }}" - state: present - notify: - - update apt cache + copy: + src: chr.asc + dest: /etc/apt/trusted.gpg.d/chr.asc + owner: root + group: root + mode: "0644" tags: - repos - zabbix @@ -80,8 +76,6 @@ state: present with_items: - 'deb http://repository.chr.istoph.de/ubuntu xenial main' - notify: - - update apt cache tags: - repos - zabbix @@ -116,5 +110,3 @@ # tags: # - repos # - zabbix - -- meta: flush_handlers