2023-03-09 08:29:28 +00:00
|
|
|
---
|
|
|
|
# task/custom_repositories file for manage_repositories
|
|
|
|
- name: "Download gpg key for custom repositories"
|
|
|
|
ansible.builtin.get_url:
|
2023-09-13 19:54:24 +00:00
|
|
|
url: "{{ item.options['Signed-By'] }}"
|
|
|
|
dest: "{{ manage_repositories_signing_keys_location }}/{{ item.name }}-archive-keyring.asc"
|
2023-03-09 08:29:28 +00:00
|
|
|
mode: '0644'
|
|
|
|
loop: "{{ manage_repositories_custom_repo }}"
|
2023-09-13 19:54:24 +00:00
|
|
|
when: item.options is defined
|
|
|
|
and item.options['Signed-By'] is defined
|
|
|
|
and item.options['Signed-By'] not in [None, '']
|
2023-03-09 08:29:28 +00:00
|
|
|
|
2023-09-13 19:54:24 +00:00
|
|
|
- name: "Configure custom repositories"
|
2023-03-09 08:29:28 +00:00
|
|
|
vars:
|
2023-09-13 19:54:24 +00:00
|
|
|
repository: "{{ item }}"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "repo.sources.j2"
|
|
|
|
dest: "{{ manage_repositories_repo_location }}/{{ item.name }}.sources"
|
|
|
|
mode: '0644'
|
|
|
|
owner: root
|
|
|
|
group: root
|
2023-03-09 08:29:28 +00:00
|
|
|
loop: "{{ manage_repositories_custom_repo }}"
|
2023-09-13 19:54:24 +00:00
|
|
|
notify:
|
|
|
|
- "debian-based-cache-update"
|