Sfoglia il codice sorgente

Revert "Fix, system.repo don't use curl on fixed pkgrepo.manage"

Commit totally broke all deployment CI job.

This reverts commit 24477c590b.

Change-Id: Idce0954f0bd363095069e91edc6941ca78b22c60
fix-curl-behind-proxy2
Vasyl Saienko 6 anni fa
parent
commit
4a23e4d201
1 ha cambiato i file con 1 aggiunte e 12 eliminazioni
  1. +1
    -12
      linux/system/repo.sls

+ 1
- 12
linux/system/repo.sls Vedi File

@@ -92,14 +92,7 @@ linux_repo_{{ name }}_key:
- pkgrepo: linux_repo_{{ name }}
{% endif %}

{# key_url fetch by curl when salt <2017.7, higher version of salt has fixed bug for using a proxy_host/port specified at minion.conf #}
{#
NOTE: curl/cmd.run usage to fetch gpg key has limited functionality behind proxy. Environments with salt >= 2017.7 shoul use
key_url specified at pkgrepo.manage state (which uses properly configured http_host at minion.conf). Older versions of
salt require to have proxy set at ENV and curl way to fetch gpg key here can have a sense for backward compatibility.
#}
{%- if grains['saltversioninfo'] < [2017, 7] %}
{%- elif repo.key_url|default(False) and not repo.key_url.startswith('salt://') %}
{%- elif repo.key_url|default(False) %}

linux_repo_{{ name }}_key:
cmd.run:
@@ -111,7 +104,6 @@ linux_repo_{{ name }}_key:
{% else %}
- pkgrepo: linux_repo_{{ name }}
{% endif %}
{%- endif %} {# key_url fetch by curl when salt <2017.7 #}

{%- endif %} {# 2 #}

@@ -140,9 +132,6 @@ linux_repo_{{ name }}:
{%- if repo.key_server is defined %}
- keyserver: {{ repo.key_server }}
{%- endif %}
{%- if repo.key_url is defined and grains['saltversioninfo'] >= [2017, 7] %}
- key_url: {{ repo.key_url }}
{%- endif %}
- consolidate: {{ repo.get('consolidate', False) }}
- clean_file: {{ repo.get('clean_file', False) }}
- refresh_db: {{ repo.get('refresh_db', True) }}

Loading…
Annulla
Salva