Bertrand Lanson
f158c340d7
All checks were successful
test / Linting (push) Successful in 20s
test / Molecule tests (default, debian12) (push) Successful in 47s
test / Molecule tests (default, ubuntu2004) (push) Successful in 56s
test / Molecule tests (default, ubuntu2204) (push) Successful in 1m10s
test / Molecule tests (with_custom_repo, debian11) (push) Successful in 54s
test / Molecule tests (with_custom_repo, debian12) (push) Successful in 54s
test / Molecule tests (with_custom_repo, ubuntu2004) (push) Successful in 58s
test / Molecule tests (with_custom_repo, ubuntu2204) (push) Successful in 58s
test / Molecule tests (default, debian11) (push) Successful in 44s
25 lines
821 B
YAML
25 lines
821 B
YAML
---
|
|
# 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"
|