mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-18 19:10:43 +01:00
Get installation working on CentOS, add Debian 8 test.
This commit is contained in:
parent
da3eb9cf1c
commit
5c864acf13
@ -8,9 +8,9 @@ env:
|
|||||||
- distro: ubuntu1604
|
- distro: ubuntu1604
|
||||||
init: /lib/systemd/systemd
|
init: /lib/systemd/systemd
|
||||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||||
- distro: ubuntu1404
|
- distro: debian8
|
||||||
init: /sbin/init
|
init: /lib/systemd/systemd
|
||||||
run_opts: ""
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Pull container.
|
# Pull container.
|
||||||
|
@ -3,3 +3,6 @@ docker_package: "docker-engine"
|
|||||||
|
|
||||||
# Used only for Debian/Ubuntu. Add 'testing' if you don't want stable.
|
# Used only for Debian/Ubuntu. Add 'testing' if you don't want stable.
|
||||||
docker_apt_repository: "deb https://apt.dockerproject.org/repo {{ ansible_distribution|lower }}-{{ ansible_distribution_release }} main"
|
docker_apt_repository: "deb https://apt.dockerproject.org/repo {{ ansible_distribution|lower }}-{{ ansible_distribution_release }} main"
|
||||||
|
|
||||||
|
# Used only for RedHat/CentOS.
|
||||||
|
docker_yum_repo_version: 'main' # 'testing', 'beta', 'nightly'
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
# - name: Add Docker GPG key.
|
- name: Add Docker GPG key.
|
||||||
# rpm_key:
|
rpm_key:
|
||||||
# key: https://apt.dockerproject.org/gpg
|
key: https://yum.dockerproject.org/gpg
|
||||||
# state: present
|
state: present
|
||||||
|
|
||||||
- name: Add Docker repository.
|
- name: Add Docker repository.
|
||||||
yum_repository:
|
template:
|
||||||
name: docker
|
src: 'docker.repo.j2'
|
||||||
description: Docker repository.
|
dest: '/etc/yum.repos.d/docker.repo'
|
||||||
baseurl: https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo
|
owner: root
|
||||||
gpgkey: https://apt.dockerproject.org/gpg
|
group: root
|
||||||
gpgcheck: yes
|
mode: 0644
|
||||||
|
6
templates/docker.repo.j2
Normal file
6
templates/docker.repo.j2
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[docker-{{ docker_yum_repo_version }}]
|
||||||
|
name=Docker Repository
|
||||||
|
baseurl=https://yum.dockerproject.org/repo/{{ docker_yum_repo_version }}/{{ ansible_distribution|lower }}/{{ ansible_distribution_version.split(".")[0]|int }}/
|
||||||
|
enabled=1
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=https://yum.dockerproject.org/gpg
|
Loading…
Reference in New Issue
Block a user