Ability to define GPG key path for Docker APT (#10513)

pull/10519/head
emiran-orange 2023-10-13 04:06:04 +02:00 committed by GitHub
parent 4a8a47d438
commit e65050d3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 0 deletions

View File

@ -97,3 +97,9 @@ Adding extra options to pass to the docker daemon:
## This string should be exactly as you wish it to appear. ## This string should be exactly as you wish it to appear.
docker_options: "" docker_options: ""
``` ```
For Debian based distributions, set the path to store the GPG key to avoid using the default one used in `apt_key` module (e.g. /etc/apt/trusted.gpg)
```yaml
docker_repo_key_keyring: /etc/apt/trusted.gpg.d/docker.gpg
```

View File

@ -5,6 +5,9 @@ docker_cli_version: "{{ docker_version }}"
docker_package_info: docker_package_info:
pkgs: pkgs:
# Path where to store repo key
# docker_repo_key_keyring: /etc/apt/trusted.gpg.d/docker.gpg
docker_repo_key_info: docker_repo_key_info:
repo_keys: repo_keys:

View File

@ -57,6 +57,7 @@
apt_key: apt_key:
id: "{{ item }}" id: "{{ item }}"
url: "{{ docker_repo_key_info.url }}" url: "{{ docker_repo_key_info.url }}"
keyring: "{{ docker_repo_key_keyring|default(omit) }}"
state: present state: present
register: keyserver_task_result register: keyserver_task_result
until: keyserver_task_result is succeeded until: keyserver_task_result is succeeded

View File

@ -7,3 +7,4 @@ mode: default
container_manager: docker container_manager: docker
etcd_deployment_type: docker etcd_deployment_type: docker
resolvconf_mode: docker_dns resolvconf_mode: docker_dns
docker_repo_key_keyring: /etc/apt/trusted.gpg.d/docker.gpg

View File

@ -15,3 +15,4 @@ enable_nodelocaldns: False
container_manager: docker container_manager: docker
etcd_deployment_type: docker etcd_deployment_type: docker
resolvconf_mode: docker_dns resolvconf_mode: docker_dns
docker_repo_key_keyring: /etc/apt/trusted.gpg.d/docker.gpg