mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-18 19:10:43 +01:00
parent
e7ff2b8657
commit
a6f9885e89
@ -12,6 +12,28 @@
|
|||||||
rpm_key:
|
rpm_key:
|
||||||
key: https://download.docker.com/linux/centos/gpg
|
key: https://download.docker.com/linux/centos/gpg
|
||||||
state: present
|
state: present
|
||||||
|
register: add_repository_key
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Ensure curl is present (on older systems without SNI).
|
||||||
|
package: name=curl state=present
|
||||||
|
when: add_repository_key|failed
|
||||||
|
|
||||||
|
- name: Download GPG key (alternative for older systems without SNI).
|
||||||
|
shell: 'curl -sSL https://download.docker.com/linux/ubuntu/gpg -o /tmp/docker-gpg'
|
||||||
|
args:
|
||||||
|
warn: no
|
||||||
|
when: add_repository_key|failed
|
||||||
|
|
||||||
|
- name: Add Docker GPG key (alternative for older systems without SNI).
|
||||||
|
shell: 'rpm --import /tmp/docker-gpg'
|
||||||
|
args:
|
||||||
|
warn: no
|
||||||
|
when: add_repository_key|failed
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: '/tmp/docker-gpg'
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Add Docker repository.
|
- name: Add Docker repository.
|
||||||
get_url:
|
get_url:
|
||||||
@ -20,6 +42,23 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
register: add_repository
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Add Docker repository (on older systems without SNI).
|
||||||
|
shell: 'curl -sSL {{ docker_yum_repo_url }} -o /etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
||||||
|
args:
|
||||||
|
warn: no
|
||||||
|
when: add_repository|failed
|
||||||
|
|
||||||
|
- name: Set permission on .repo file (on older systems without SNI).
|
||||||
|
file:
|
||||||
|
path: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
||||||
|
state: file
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: add_repository|failed
|
||||||
|
|
||||||
- name: Configure Docker Edge repo.
|
- name: Configure Docker Edge repo.
|
||||||
ini_file:
|
ini_file:
|
||||||
|
Loading…
Reference in New Issue
Block a user