manage_repositories/tasks/custom_repositories.yml
Bertrand Lanson 880451bcd5
Some checks failed
test / Linting (push) Failing after 29s
test / Molecule tests (default, debian11) (push) Has been skipped
test / Molecule tests (default, debian12) (push) Has been skipped
test / Molecule tests (default, ubuntu2004) (push) Has been skipped
test / Molecule tests (default, ubuntu2204) (push) Has been skipped
test / Molecule tests (with_custom_repo, debian11) (push) Has been skipped
test / Molecule tests (with_custom_repo, debian12) (push) Has been skipped
test / Molecule tests (with_custom_repo, ubuntu2004) (push) Has been skipped
test / Molecule tests (with_custom_repo, ubuntu2204) (push) Has been skipped
fixed custom repositories, fixed tests
2023-09-13 21:54:24 +02:00

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"