mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 00:33:04 +03: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
|
||||
init: /lib/systemd/systemd
|
||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
- distro: ubuntu1404
|
||||
init: /sbin/init
|
||||
run_opts: ""
|
||||
- distro: debian8
|
||||
init: /lib/systemd/systemd
|
||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
|
||||
before_install:
|
||||
# Pull container.
|
||||
|
@ -3,3 +3,6 @@ docker_package: "docker-engine"
|
||||
|
||||
# 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"
|
||||
|
||||
# Used only for RedHat/CentOS.
|
||||
docker_yum_repo_version: 'main' # 'testing', 'beta', 'nightly'
|
||||
|
@ -1,13 +1,13 @@
|
||||
---
|
||||
# - name: Add Docker GPG key.
|
||||
# rpm_key:
|
||||
# key: https://apt.dockerproject.org/gpg
|
||||
# state: present
|
||||
- name: Add Docker GPG key.
|
||||
rpm_key:
|
||||
key: https://yum.dockerproject.org/gpg
|
||||
state: present
|
||||
|
||||
- name: Add Docker repository.
|
||||
yum_repository:
|
||||
name: docker
|
||||
description: Docker repository.
|
||||
baseurl: https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo
|
||||
gpgkey: https://apt.dockerproject.org/gpg
|
||||
gpgcheck: yes
|
||||
template:
|
||||
src: 'docker.repo.j2'
|
||||
dest: '/etc/yum.repos.d/docker.repo'
|
||||
owner: root
|
||||
group: root
|
||||
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