mirror of
https://github.com/luzifer-ansible/docker.git
synced 2024-12-22 00:41:17 +00:00
Add support for archlinux
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
e90af1d307
commit
aa8b89604d
6 changed files with 48 additions and 20 deletions
|
@ -4,6 +4,7 @@ This role installs latest docker-ce on a host, configures its startup parameters
|
|||
|
||||
## Requirements
|
||||
|
||||
- Archlinux
|
||||
- Debian >= 8 (jessie)
|
||||
- Ubuntu >= 16.04 (xenial)
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ galaxy_info:
|
|||
versions:
|
||||
- jessie
|
||||
- stretch
|
||||
- name: Archlinux
|
||||
versions: [all]
|
||||
|
||||
categories:
|
||||
#- cloud
|
||||
|
|
14
tasks/Archlinux.yml
Normal file
14
tasks/Archlinux.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
|
||||
- name: Install docker
|
||||
pacman:
|
||||
name: docker
|
||||
update_cache: true
|
||||
|
||||
- name: Enable and start docker
|
||||
systemd:
|
||||
name: docker
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
...
|
5
tasks/Debian.yml
Normal file
5
tasks/Debian.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
|
||||
- include: Ubuntu.yml
|
||||
|
||||
...
|
24
tasks/Ubuntu.yml
Normal file
24
tasks/Ubuntu.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
|
||||
- name: Install apt-key
|
||||
apt_key:
|
||||
id: 0EBFCD88
|
||||
url: 'https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg'
|
||||
keyring: /etc/apt/trusted.gpg.d/docker.gpg
|
||||
|
||||
- name: Ensure https transport to be available
|
||||
apt:
|
||||
name: apt-transport-https
|
||||
cache_valid_time: 86400
|
||||
|
||||
- name: Activate apt-repo
|
||||
apt_repository:
|
||||
repo: 'deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_channel }}'
|
||||
state: present
|
||||
|
||||
- name: Install docker
|
||||
apt:
|
||||
name: docker-ce
|
||||
cache_valid_time: 86400
|
||||
|
||||
...
|
|
@ -1,25 +1,7 @@
|
|||
---
|
||||
|
||||
- name: Install apt-key
|
||||
apt_key:
|
||||
id: 0EBFCD88
|
||||
url: 'https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg'
|
||||
keyring: /etc/apt/trusted.gpg.d/docker.gpg
|
||||
|
||||
- name: Ensure https transport to be available
|
||||
apt:
|
||||
name: apt-transport-https
|
||||
cache_valid_time: 86400
|
||||
|
||||
- name: Activate apt-repo
|
||||
apt_repository:
|
||||
repo: 'deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_channel }}'
|
||||
state: present
|
||||
|
||||
- name: Install docker
|
||||
apt:
|
||||
name: docker-ce
|
||||
cache_valid_time: 86400
|
||||
- name: "Loading distribution specific instructions for {{ ansible_distribution }}"
|
||||
include: "{{ ansible_distribution }}.yml"
|
||||
|
||||
- set_fact:
|
||||
docker_global_ipv6: "{{ ansible_eth0.ipv6 | selectattr('scope', 'equalto', 'global') | first }}"
|
||||
|
|
Loading…
Reference in a new issue