Parameterize apt repo endpoints

This allows overriding of apt repo endpoints when internet sources are not accessible. Additionally, switch to using the dockerproject.org gpg key url for apt instead of keyservers.net
This commit is contained in:
Chad Swenson 2017-10-27 13:48:11 -05:00
parent fe81bba08d
commit 256bbb1a8a
4 changed files with 7 additions and 5 deletions

View file

@ -16,3 +16,5 @@ docker_container_storage_setup: false
docker_rh_repo_base_url: 'https://yum.dockerproject.org/repo/main/centos/7' docker_rh_repo_base_url: 'https://yum.dockerproject.org/repo/main/centos/7'
docker_rh_repo_gpgkey: 'https://yum.dockerproject.org/gpg' docker_rh_repo_gpgkey: 'https://yum.dockerproject.org/gpg'
docker_apt_repo_base_url: 'https://apt.dockerproject.org/repo'
docker_apt_repo_gpgkey: 'https://apt.dockerproject.org/gpg'

View file

@ -34,7 +34,7 @@
action: "{{ docker_repo_key_info.pkg_key }}" action: "{{ docker_repo_key_info.pkg_key }}"
args: args:
id: "{{item}}" id: "{{item}}"
keyserver: "{{docker_repo_key_info.keyserver}}" url: "{{docker_repo_key_info.url}}"
state: present state: present
register: keyserver_task_result register: keyserver_task_result
until: keyserver_task_result|succeeded until: keyserver_task_result|succeeded

View file

@ -18,7 +18,7 @@ docker_package_info:
docker_repo_key_info: docker_repo_key_info:
pkg_key: apt_key pkg_key: apt_key
keyserver: hkp://p80.pool.sks-keyservers.net:80 url: '{{ docker_apt_repo_gpgkey }}'
repo_keys: repo_keys:
- 58118E89F3A912897C070ADBF76221572C52609D - 58118E89F3A912897C070ADBF76221572C52609D
@ -26,6 +26,6 @@ docker_repo_info:
pkg_repo: apt_repository pkg_repo: apt_repository
repos: repos:
- > - >
deb https://apt.dockerproject.org/repo deb {{ docker_apt_repo_base_url }}
{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }} {{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}
main main

View file

@ -18,7 +18,7 @@ docker_package_info:
docker_repo_key_info: docker_repo_key_info:
pkg_key: apt_key pkg_key: apt_key
keyserver: hkp://p80.pool.sks-keyservers.net:80 url: '{{ docker_apt_repo_gpgkey }}'
repo_keys: repo_keys:
- 58118E89F3A912897C070ADBF76221572C52609D - 58118E89F3A912897C070ADBF76221572C52609D
@ -26,6 +26,6 @@ docker_repo_info:
pkg_repo: apt_repository pkg_repo: apt_repository
repos: repos:
- > - >
deb https://apt.dockerproject.org/repo deb {{ docker_apt_repo_base_url }}
{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }} {{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}
main main