2017-02-22 00:58:24 +08:00
|
|
|
---
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: include remove_ceph_udev_rules.yml
|
2018-08-21 22:23:35 +08:00
|
|
|
include_tasks: remove_ceph_udev_rules.yml
|
2017-08-25 20:36:07 +08:00
|
|
|
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: debian based systems tasks
|
|
|
|
block:
|
|
|
|
- name: include debian_prerequisites.yml
|
|
|
|
include_tasks: debian_prerequisites.yml
|
|
|
|
tags:
|
|
|
|
with_pkg
|
|
|
|
- name: install python-six
|
|
|
|
package:
|
|
|
|
name: python-six
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_distribution == 'Debian'
|
2017-02-22 00:58:24 +08:00
|
|
|
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: ubuntu based systems tasks
|
|
|
|
block:
|
|
|
|
- name: install docker on ubuntu
|
|
|
|
package:
|
2018-11-08 17:26:58 +08:00
|
|
|
name: ['docker.io', 'python-docker']
|
2018-09-07 20:45:43 +08:00
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_distribution == 'Ubuntu'
|
2017-02-22 00:58:24 +08:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: red hat based systems tasks
|
|
|
|
block:
|
|
|
|
- name: install python-docker-py on red hat / centos
|
|
|
|
package:
|
2018-11-08 17:26:58 +08:00
|
|
|
name: ['docker', 'python-docker-py']
|
2018-09-07 20:45:43 +08:00
|
|
|
state: present
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
tags:
|
|
|
|
with_pkg
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
2017-02-22 00:58:24 +08:00
|
|
|
|
|
|
|
- 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
|