Skip to content

Commit

Permalink
add kernel version check...
Browse files Browse the repository at this point in the history
  • Loading branch information
marklee77 committed May 28, 2015
1 parent 73d50a4 commit cf1df51
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
- ../vars/{{ ansible_os_family }}.yml
- ../vars/defaults.yml

- name: check for minimum kernel version
fail:
msg: |
docker requires a minimum kernel version of
{{ docker_kernel_min_version }} on
{{ ansible_distribution }}-{{ ansible_distribution_version }}
when: ansible_kernel|version_compare("{{ docker_kernel_min_version }}", "<")

- name: ensure docker requirements packages are installed
action: "{{ docker_package_info.pkg_mgr }}"
args: docker_package_info.args
Expand Down
2 changes: 2 additions & 0 deletions vars/CentOS-6.5.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docker_kernel_min_version: '2.6.32-431'

docker_package_info:
pkg_mgr: yum
args:
Expand Down
2 changes: 2 additions & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docker_kernel_min_version: '3.8'

docker_package_info:
pkg_mgr: apt
args:
Expand Down
2 changes: 2 additions & 0 deletions vars/Fedora-20.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docker_kernel_min_version: '0'

docker_package_info:
pkg_mgr: yum
args:
Expand Down
2 changes: 2 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docker_kernel_min_version: '0'

docker_package_info:
pkg_mgr: yum
args:
Expand Down
34 changes: 34 additions & 0 deletions vars/Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
docker_kernel_min_version: '3.10'

docker_package_info:
pkg_mgr: apt
args:
pkg: "{{ item }}"
update_cache: yes
cache_valid_time: 600
state: latest
pre_pkgs:
- apt-transport-https
- software-properties-common
pkgs:
- lxc-docker

docker_repo_key_info:
pkg_key: apt_key
args:
id: "{{ item }}"
keyserver: hkp://keyserver.ubuntu.com:80
state: present
repo_keys:
- 36A1D7869245C8950F966E92D8576A8BA88D21E9

docker_repo_info:
pkg_repo: apt_repository
args:
repo: "{{ item }}"
update_cache: yes
state: present
repos:
- deb https://get.docker.io/ubuntu docker main

docker_pip_path: /usr/local/bin/pip

0 comments on commit cf1df51

Please sign in to comment.