Use ansible_distribution* facts instead of ansible_lsb
lsb_release executable might not be available. The following errors occur when lsb_release isn't available: TASK [ensure-docker : Sanity check for upstream install mirrors] ERROR { "msg": "The conditional check '(docker_mirror_base_url | length) < 1' failed. The error was: error while evaluating conditional ((docker_mirror_base_url | length) < 1): 'dict object' has no attribute 'id' [...]" } LOOP [ensure-package-repositories : Add apt repositories] ERROR { "msg": "'dict object' has no attribute 'codename'" } Change-Id: I93ea718f24bd7176dca9daa82fe5b2635e21d730
This commit is contained in:
parent
4d2c441f40
commit
56d37dc542
@ -66,7 +66,7 @@ _docker_keys:
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
_docker_repos:
|
||||
- repo: "deb {{ docker_mirror_base_url }} {{ ansible_lsb.codename }} {{ docker_update_channel }}"
|
||||
- repo: "deb {{ docker_mirror_base_url }} {{ ansible_distribution_release }} {{ docker_update_channel }}"
|
||||
|
||||
_docker_distro_packages:
|
||||
- docker.io
|
||||
@ -87,4 +87,4 @@ _docker_upstream_distro_remove_packages:
|
||||
|
||||
docker_distro_vars_loaded: true
|
||||
|
||||
_docker_mirror_base_url: "https://{{ docker_download_fqdn }}/linux/{{ ansible_lsb.id | lower }}"
|
||||
_docker_mirror_base_url: "https://{{ docker_download_fqdn }}/linux/{{ ansible_distribution | lower }}"
|
||||
|
Loading…
Reference in New Issue
Block a user