From 59550d55d13fc900f9dbef094cea47d2e4ab7feb Mon Sep 17 00:00:00 2001 From: hatifnatt Date: Thu, 29 Mar 2018 15:54:32 +0300 Subject: [PATCH] Get rid of manual GPG key management for Debian. Use key from repository with 'key_url'. --- .../default/tmp/zabbix-official-repo.gpg | 49 ------------------- zabbix/repo.sls | 18 +------ 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 zabbix/files/default/tmp/zabbix-official-repo.gpg diff --git a/zabbix/files/default/tmp/zabbix-official-repo.gpg b/zabbix/files/default/tmp/zabbix-official-repo.gpg deleted file mode 100644 index d814e63d..00000000 --- a/zabbix/files/default/tmp/zabbix-official-repo.gpg +++ /dev/null @@ -1,49 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.10 (GNU/Linux) - -mQGiBFCNJaYRBAC4nIW8o2NyOIswb82Xn3AYSMUcNZuKB2fMtpu0WxSXIRiX2BwC -YXx8cIEQVYtLRBL5o0JdmoNCjW6jd5fOVem3EmOcPksvzzRWonIgFHf4EI2n1KJc -JXX/nDC+eoh5xW35mRNFN/BEJHxxiRGGbp2MCnApwgrZLhOujaCGAwavGwCgiG4D -wKMZ4xX6Y2Gv3MSuzMIT0bcEAKYn3WohS+udp0yC3FHDj+oxfuHpklu1xuI3y6ha -402aEFahNi3wr316ukgdPAYLbpz76ivoouTJ/U2MqbNLjAspDvlnHXXyqPM5GC6K -jtXPqNrRMUCrwisoAhorGUg/+S5pyXwsWcJ6EKmA80pR9HO+TbsELE5bGe/oc238 -t/2oBAC3zcQ46wPvXpMCNFb+ED71qDOlnDYaaAPbjgkvnp+WN6nZFFyevjx180Kw -qWOLnlNP6JOuFW27MP75MDPDpbAAOVENp6qnuW9dxXTN80YpPLKUxrQS8vWPnzkY -WtUfF75pEOACFVTgXIqEgW0E6oww2HJi9zF5fS8IlFHJztNYtbQgWmFiYml4IFNJ -QSA8cGFja2FnZXJAemFiYml4LmNvbT6IYAQTEQIAIAUCUI0lpgIbA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+dCCX -ui+/5ZJHakC67t5OgbMas3Hz4Q== -=HHRW ------END PGP PUBLIC KEY BLOCK----- diff --git a/zabbix/repo.sls b/zabbix/repo.sls index a5661eeb..f6957134 100644 --- a/zabbix/repo.sls +++ b/zabbix/repo.sls @@ -25,23 +25,7 @@ pkgrepo.managed: - name: deb http://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/{{ salt['grains.get']('os')|lower }} {{ salt['grains.get']('oscodename') }} main - file: /etc/apt/sources.list.d/zabbix.list - - require: - - cmd: {{ id_prefix }}_repo_add_gpg - - -{{ id_prefix }}_repo_add_gpg: - cmd.wait: - - name: /usr/bin/apt-key add /var/tmp/zabbix-official-repo.gpg - - watch: - - file: {{ id_prefix }}_repo_gpg_file - - -# GPG key of official Zabbix repo -{{ id_prefix }}_repo_gpg_file: - file.managed: - - name: /var/tmp/zabbix-official-repo.gpg - - source: {{ files_switch('zabbix', - ['/tmp/zabbix-official-repo.gpg']) }} + - key_url: https://repo.zabbix.com/zabbix-official-repo.key {%- elif salt['grains.get']('os_family') == 'RedHat' and