瀏覽代碼

Change requisite clausule.

Add check for existing key for idempotency.
pull/150/head
Martin Horak 6 年之前
父節點
當前提交
f1feaf60a3
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      linux/system/repo.sls

+ 4
- 2
linux/system/repo.sls 查看文件

@@ -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 %}

Loading…
取消
儲存