diff --git a/ansible/roles/dnf/tasks/custom-repo.yml b/ansible/roles/dnf/tasks/custom-repo.yml index e5fdbf2e1..cabcb8f9b 100644 --- a/ansible/roles/dnf/tasks/custom-repo.yml +++ b/ansible/roles/dnf/tasks/custom-repo.yml @@ -3,7 +3,7 @@ yum_repository: name: "{{ item.key }}" description: "{% if 'description' in item.value %}{{ item.value.description }}{% else %}{{ item.key }} repository{% endif %}" - baseurl: "{{ item.value.baseurl }}" + baseurl: "{{ item.value.baseurl | default(omit)}}" file: "{{ item.value.file | default(omit)}}" gpgkey: "{{ item.value.gpgkey | default(omit)}}" gpgcheck: "{{ item.value.gpgcheck | default(omit)}}" @@ -11,6 +11,7 @@ enabled: "{{ item.value.enabled | default(omit)}}" gpgcakey: "{{ item.value.gpgcakey | default(omit)}}" metadata_expire: "{{ item.value.metadata_expire | default(omit)}}" + metalink: "{{ item.value.metalink | default(omit)}}" mirrorlist: "{{ item.value.mirrorlist | default(omit)}}" mirrorlist_expire: "{{ item.value.mirrorlist_expire | default(omit)}}" priority: "{{ item.value.priority | default(omit)}}" diff --git a/releasenotes/notes/yum-repository-metalink-26afa7c9f7026539.yaml b/releasenotes/notes/yum-repository-metalink-26afa7c9f7026539.yaml new file mode 100644 index 000000000..f23894eaf --- /dev/null +++ b/releasenotes/notes/yum-repository-metalink-26afa7c9f7026539.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for the ``metalink`` option in custom DNF repositories + configured with ``dnf_custom_repos`` in ``dnf.yml``.