2017-02-22 00:58:24 +08:00
|
|
|
---
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: include remove_ceph_udev_rules.yml
|
|
|
|
include: remove_ceph_udev_rules.yml
|
2017-08-25 20:36:07 +08:00
|
|
|
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: include debian_prerequisites.yml
|
|
|
|
include: debian_prerequisites.yml
|
|
|
|
when:
|
|
|
|
- ansible_distribution == 'Debian'
|
2017-08-25 20:36:07 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2017-02-22 00:58:24 +08:00
|
|
|
|
|
|
|
- name: install docker on ubuntu
|
|
|
|
package:
|
|
|
|
name: docker.io
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_distribution == 'Ubuntu'
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
# ensure extras enabled for docker
|
|
|
|
- name: enable extras on centos
|
|
|
|
yum_repository:
|
|
|
|
name: extras
|
|
|
|
state: present
|
|
|
|
enabled: yes
|
|
|
|
when:
|
|
|
|
- ansible_distribution == 'CentOS'
|
2017-03-16 17:57:13 +08:00
|
|
|
- ceph_docker_enable_centos_extra_repo
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: install python-six
|
|
|
|
package:
|
|
|
|
name: python-six
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_distribution != 'Debian'
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: install python-docker-py on red hat / centos
|
|
|
|
package:
|
|
|
|
name: python-docker-py
|
|
|
|
state: present
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: install python-docker on ubuntu
|
|
|
|
package:
|
|
|
|
name: python-docker
|
|
|
|
state: present
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_distribution == 'Ubuntu'
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: install docker on red hat / centos
|
|
|
|
package:
|
|
|
|
name: docker
|
|
|
|
state: present
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: pause after docker install before starting (on openstack vms)
|
|
|
|
pause: seconds=5
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ceph_docker_on_openstack
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: start docker service
|
|
|
|
service:
|
|
|
|
name: docker
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
|
|
|
|
- name: install ntp
|
|
|
|
package:
|
|
|
|
name: ntp
|
|
|
|
state: present
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ntp_service_enabled
|
2017-02-22 00:58:24 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|