mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-11 13:46:32 +02:00
Update setup-Debian.yml to support Ubuntu16 (#2)
* Add conditions to use apt-key for old versions of ubuntu (16.04 and older)
This commit is contained in:
parent
9154e3bf75
commit
5c0726e7d2
@ -33,17 +33,22 @@
|
||||
force: true
|
||||
register: add_repository_key
|
||||
ignore_errors: "{{ docker_apt_ignore_key_error }}"
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('18.04', '>=')
|
||||
|
||||
- name: Ensure curl is present (on older systems without SNI).
|
||||
package: name=curl state=present
|
||||
when: add_repository_key is failed
|
||||
when: >
|
||||
(add_repository_key is skipped)
|
||||
or (add_repository_key is failed)
|
||||
|
||||
- name: Add Docker apt key (alternative for older systems without SNI).
|
||||
shell: >
|
||||
curl -sSL {{ docker_apt_gpg_key }} | apt-key add -
|
||||
args:
|
||||
warn: false
|
||||
when: add_repository_key is failed
|
||||
when: >
|
||||
(add_repository_key is skipped)
|
||||
or (add_repository_key is failed)
|
||||
|
||||
- name: Add Docker repository.
|
||||
apt_repository:
|
||||
|
Loading…
Reference in New Issue
Block a user