hcp-ansible/roles/ednxzu.manage_repositories/tasks/custom_repositories.yml

25 lines
821 B
YAML
Raw Normal View History

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