baremetal: use docker_yum_gpgkey to fetch docker GPG key

Currently, if you override docker_yum_url, the repo must contain a GPG
key at {{ docker_yum_url }}/gpg, despite the fact that the GPG key URL
can be overridden separately via docker_yum_gpgkey. This change uses
docker_yum_gpgkey consistently, avoiding the need to keep the key in the
repo.

Closes-Bug: #1934913
Change-Id: If8e6a02ce0760123f7b076c711727ef575965192
This commit is contained in:
Mark Goddard 2021-07-07 17:18:26 +01:00
parent e63d985ccb
commit 54737cd13f
2 changed files with 7 additions and 1 deletions

View File

@ -144,7 +144,7 @@
- name: Install docker rpm gpg key
rpm_key:
state: present
key: "{{ docker_yum_url }}/gpg"
key: "{{ docker_yum_gpgkey }}"
become: True
when: docker_yum_gpgcheck | bool
when: ansible_facts.os_family == 'RedHat'

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue seen when customising the Docker Yum repository URL on
CentOS, where the ``docker_yum_gpgkey`` variable is not used consistently.
`LP#1934913 <https://bugs.launchpad.net/kolla-ansible/+bug/1934913>`__