mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 00:33:04 +03:00
Handle the exception more cleanly
This commit is contained in:
parent
43b5ad4fef
commit
48688d0faf
@ -31,10 +31,11 @@ docker_repo_url: https://download.docker.com/linux
|
|||||||
|
|
||||||
# Used only for Debian/Ubuntu. Switch 'stable' to 'nightly' if needed.
|
# Used only for Debian/Ubuntu. Switch 'stable' to 'nightly' if needed.
|
||||||
docker_apt_release_channel: stable
|
docker_apt_release_channel: stable
|
||||||
|
docker_apt_ansible_distro_name: "{{ 'ubuntu' if ansible_distribution == 'Pop!_OS' else ansible_distribution }}"
|
||||||
docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
|
docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
|
||||||
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ docker_apt_ansible_distro_name | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
||||||
docker_apt_ignore_key_error: true
|
docker_apt_ignore_key_error: true
|
||||||
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg"
|
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ docker_apt_ansible_distro_name | lower }}/gpg"
|
||||||
|
|
||||||
# Used only for RedHat/CentOS/Fedora.
|
# Used only for RedHat/CentOS/Fedora.
|
||||||
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"
|
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
# Since:
|
|
||||||
# * `ansible_distribution` evaluates to Pop!_OS, and
|
|
||||||
# * docker does not (yet) support Pop!_OS, and
|
|
||||||
# * Pop_OS is effectively Ubuntu (for our purposes), and
|
|
||||||
# * There isn't a 'better' variable we easily use
|
|
||||||
# we need to just wire in 'ubuntu' instead of relying on `ansible_distribution`.
|
|
||||||
|
|
||||||
# If "https://download.docker.com/linux/pop!_os/gpg" ever exists, this can be removed.
|
|
||||||
docker_apt_gpg_key: "{{ docker_repo_url }}/ubuntu/gpg"
|
|
||||||
|
|
||||||
# If "https://download.docker.com/linux/pop!_os/....." ever exists, this can be removed.
|
|
||||||
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/ubuntu {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
|
Loading…
Reference in New Issue
Block a user