Browse Source

Workaround for fetching repo keys via proxy.

pull/150/head
Martin Horak 6 years ago
parent
commit
a73b87150e
1 changed files with 18 additions and 3 deletions
  1. +18
    -3
      linux/system/repo.sls

+ 18
- 3
linux/system/repo.sls View File

@@ -121,9 +121,6 @@ linux_repo_{{ name }}:
{%- if repo.key_server is defined %}
- keyserver: {{ repo.key_server }}
{%- endif %}
{%- if repo.key_url is defined %}
- 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) }}
@@ -140,6 +137,24 @@ linux_repo_{{ name }}:
{%- endif %}
{%- endif %}

{%- if repo.get('key') %}

linux_repo_{{ name }}_key:
cmd.run:
- name: "echo '{{ repo.key }}' | apt-key add -"
- onchange:
- pkgrepo: linux_repo_{{ name }}

{%- elif repo.key_url|default(False) %}

linux_repo_{{ name }}_key:
cmd.run:
- name: "curl -s {{ repo.key_url }} | apt-key add -"
- onchange:
- pkgrepo: linux_repo_{{ name }}

{%- endif %}

{%- else %}

linux_repo_{{ name }}_absent:

Loading…
Cancel
Save