|
|
|
|
|
|
|
|
|
|
|
|
|
|
linux_repo_{{ name }}_key: |
|
|
linux_repo_{{ name }}_key: |
|
|
cmd.wait: |
|
|
cmd.wait: |
|
|
- name: "echo '{{ repo.key }}' | apt-key add -" |
|
|
|
|
|
|
|
|
- name: "echo -e '{{ repo.key|replace('\n', '\\n') }}' | apt-key add -" |
|
|
- watch: |
|
|
- watch: |
|
|
- file: default_repo_list |
|
|
- file: default_repo_list |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
linux_repo_{{ name }}_key: |
|
|
linux_repo_{{ name }}_key: |
|
|
cmd.wait: |
|
|
cmd.wait: |
|
|
- name: "curl -s {{ repo.key_url }} | apt-key add -" |
|
|
|
|
|
|
|
|
- name: "curl -sL {{ repo.key_url }} | apt-key add -" |
|
|
- watch: |
|
|
- watch: |
|
|
- file: default_repo_list |
|
|
- file: default_repo_list |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{%- if repo.key_server is defined %} |
|
|
{%- if repo.key_server is defined %} |
|
|
- keyserver: {{ repo.key_server }} |
|
|
- keyserver: {{ repo.key_server }} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- if repo.key_url is defined %} |
|
|
|
|
|
- key_url: {{ repo.key_url }} |
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
- consolidate: {{ repo.get('consolidate', False) }} |
|
|
- consolidate: {{ repo.get('consolidate', False) }} |
|
|
- clean_file: {{ repo.get('clean_file', False) }} |
|
|
- clean_file: {{ repo.get('clean_file', False) }} |
|
|
- refresh_db: {{ repo.get('refresh_db', True) }} |
|
|
- refresh_db: {{ repo.get('refresh_db', True) }} |
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if repo.get('key') %} |
|
|
|
|
|
|
|
|
|
|
|
linux_repo_{{ name }}_key: |
|
|
|
|
|
cmd.run: |
|
|
|
|
|
- name: "echo -e '{{ repo.key|replace('\n', '\\n') }}' | apt-key add -" |
|
|
|
|
|
- unless: "apt-key finger --with-colons | grep -qF $(echo -e '{{ repo.key|replace('\n', '\\n') }}' | gpg --with-fingerprint --with-colons | grep -E '^fpr')" |
|
|
|
|
|
- require_in: |
|
|
|
|
|
- pkgrepo: linux_repo_{{ name }} |
|
|
|
|
|
|
|
|
|
|
|
{%- elif repo.key_url|default(False) %} |
|
|
|
|
|
|
|
|
|
|
|
linux_repo_{{ name }}_key: |
|
|
|
|
|
cmd.run: |
|
|
|
|
|
- name: "curl -sL {{ repo.key_url }} | apt-key add -" |
|
|
|
|
|
- unless: "apt-key finger --with-colons | grep -qF $(curl -sL {{ repo.key_url }} | gpg --with-fingerprint --with-colons | grep -E '^fpr')" |
|
|
|
|
|
- require_in: |
|
|
|
|
|
- pkgrepo: linux_repo_{{ name }} |
|
|
|
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- else %} |
|
|
{%- else %} |
|
|
|
|
|
|
|
|
linux_repo_{{ name }}_absent: |
|
|
linux_repo_{{ name }}_absent: |