Pārlūkot izejas kodu

Change requisite clausule.

Add check for existing key for idempotency.
pull/150/head
Martin Horak pirms 6 gadiem
vecāks
revīzija
f1feaf60a3
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. +4
    -2
      linux/system/repo.sls

+ 4
- 2
linux/system/repo.sls Parādīt failu

@@ -142,7 +142,8 @@ linux_repo_{{ name }}:
linux_repo_{{ name }}_key:
cmd.run:
- name: "echo '{{ repo.key }}' | apt-key add -"
- onchange:
- unless: "apt-key finger --with-colons | grep -qF $(echo '{{ repo-key }} | gpg --with-fingerprint --with-colons | grep -E '^fpr')"
- require_in:
- pkgrepo: linux_repo_{{ name }}

{%- elif repo.key_url|default(False) %}
@@ -150,7 +151,8 @@ linux_repo_{{ name }}_key:
linux_repo_{{ name }}_key:
cmd.run:
- name: "curl -s {{ repo.key_url }} | apt-key add -"
- onchange:
- unless: "apt-key finger --with-colons | grep -qF $(curl -s {{ repo.key_url }} | gpg --with-fingerprint --with-colons | grep -E '^fpr')"
- require_in:
- pkgrepo: linux_repo_{{ name }}

{%- endif %}

Notiek ielāde…
Atcelt
Saglabāt