2015-07-28 23:35:47 +08:00
|
|
|
---
|
2016-02-08 22:25:24 +08:00
|
|
|
- name: install pip and docker on ubuntu
|
2015-11-16 18:47:23 +08:00
|
|
|
apt:
|
2016-02-08 05:30:32 +08:00
|
|
|
name: "{{ item }}"
|
2015-11-16 18:47:23 +08:00
|
|
|
state: present
|
2016-02-08 05:30:32 +08:00
|
|
|
update_cache: yes
|
|
|
|
with_items:
|
|
|
|
- python-pip
|
|
|
|
- docker
|
|
|
|
- docker.io
|
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2016-01-23 03:10:41 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2015-11-16 18:47:23 +08:00
|
|
|
|
2016-02-08 05:30:32 +08:00
|
|
|
- name: install pip and docker on debian
|
|
|
|
apt:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
|
|
|
with_items:
|
|
|
|
- python-pip
|
|
|
|
- docker-engine
|
|
|
|
when: ansible_distribution == 'Debian'
|
2016-01-23 03:10:41 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2016-02-08 05:30:32 +08:00
|
|
|
|
|
|
|
- name: install pip and docker on redhat
|
2015-11-16 18:47:23 +08:00
|
|
|
yum:
|
2016-02-08 05:30:32 +08:00
|
|
|
name: "{{ item }}"
|
2015-11-16 18:47:23 +08:00
|
|
|
state: present
|
2016-02-08 05:30:32 +08:00
|
|
|
with_items:
|
|
|
|
- python-pip
|
|
|
|
- docker-engine
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
|
|
|
ansible_os_family == 'RedHat' and
|
|
|
|
ansible_pkg_mgr == "yum"
|
2016-01-23 03:10:41 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-02-08 05:30:32 +08:00
|
|
|
- name: install pip and docker on redhat
|
2016-01-29 02:11:22 +08:00
|
|
|
dnf:
|
2016-02-08 05:30:32 +08:00
|
|
|
name: "{{ item }}"
|
2016-01-29 02:11:22 +08:00
|
|
|
state: present
|
2016-02-08 05:30:32 +08:00
|
|
|
with_items:
|
|
|
|
- python-pip
|
|
|
|
- docker-engine
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
|
|
|
ansible_os_family == 'RedHat' and
|
|
|
|
ansible_pkg_mgr == "dnf"
|
2016-01-23 03:10:41 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2015-11-16 18:47:23 +08:00
|
|
|
|
2016-01-23 03:10:41 +08:00
|
|
|
- name: install epel-release on redhat
|
|
|
|
yum:
|
|
|
|
name: epel-release
|
|
|
|
state: present
|
|
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
# NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
|
|
|
|
# re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
|
|
|
|
- name: install six
|
2015-10-19 11:19:31 +08:00
|
|
|
pip:
|
2016-01-23 03:10:41 +08:00
|
|
|
name: six
|
|
|
|
version: 1.9.0
|
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: pause after docker install before starting (on openstack vms)
|
|
|
|
pause: seconds=5
|
|
|
|
when: ceph_docker_on_openstack
|
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: start docker service
|
|
|
|
service:
|
|
|
|
name: docker
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
tags:
|
|
|
|
with_pkg
|