Parcourir la source

Conditionally disable apt-key usage (#235)

Disable apt-key usage when salt version is at least 3005, and the user
provides 'signed-by=' in their source, and we're on a newer version of
Debian or Ubuntu.
apt-key is deprecated, see the following for more context:

https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html#apt-key-deprecated

Signed-off-by: M. David Bennett <mdavidbennett@syntheticworks.com>
master
M. David Bennett il y a 8 mois
Parent
révision
addd0d2da0
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 15 ajouts et 0 suppressions
  1. +15
    -0
      linux/system/repo.sls

+ 15
- 0
linux/system/repo.sls Voir le fichier

@@ -135,6 +135,21 @@ linux_repo_{{ name }}:
{%- if repo.key_url is defined and (grains['saltversioninfo'] >= [2017, 7] or repo.key_url.startswith('salt://')) %}
- key_url: {{ repo.key_url }}
{%- endif %}
{#
Disable apt-key usage when salt version is at least 3005, and the user provides
'signed-by=' in their source, and we're on a newer version of Debian or Ubuntu.
apt-key is deprecated, see the following for more context:
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.pkgrepo.html#apt-key-deprecated
#}
{%- if grains['saltversioninfo'] >= [3005, 0] and
'signed-by=' in repo.source and
(
(grains['os'] == 'Debian' and grains['osrelease_info'] >= (11,)) or
(grains['os'] == 'Ubuntu' and grains['osrelease_info'] >= (22, 4))
)
%}
- aptkey: False
{%- endif %}
- consolidate: {{ repo.get('consolidate', False) }}
- require:
- file: /etc/apt/apt.conf.d/99proxies-salt-{{ name }}

Chargement…
Annuler
Enregistrer