2014-03-04 02:08:51 +08:00
|
|
|
---
|
|
|
|
# Defines deployment design and assigns role to server groups
|
|
|
|
|
2016-10-12 12:03:52 +08:00
|
|
|
- hosts:
|
|
|
|
- mons
|
|
|
|
- agents
|
|
|
|
- osds
|
|
|
|
- mdss
|
|
|
|
- rgws
|
|
|
|
- nfss
|
|
|
|
- restapis
|
|
|
|
- rbdmirrors
|
|
|
|
- clients
|
|
|
|
- iscsigws
|
2017-03-16 17:17:08 +08:00
|
|
|
- mgrs
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-12-14 23:13:55 +08:00
|
|
|
tags:
|
|
|
|
- always
|
2016-10-12 12:03:52 +08:00
|
|
|
tasks:
|
|
|
|
# If we can't get python2 installed before any module is used we will fail
|
|
|
|
# so just try what we can to get it installed
|
|
|
|
- name: check for python2
|
|
|
|
stat:
|
|
|
|
path: /usr/bin/python
|
|
|
|
ignore_errors: yes
|
|
|
|
register: systempython2
|
|
|
|
- name: install python2 for Debian based systems
|
|
|
|
raw: sudo apt-get -y install python-simplejson
|
|
|
|
ignore_errors: yes
|
|
|
|
when: systempython2.stat.exists is undefined or systempython2.stat.exists == false
|
|
|
|
# Try to install python2 on Fedora > 23
|
|
|
|
- name: install python2 for Fedora
|
|
|
|
raw: sudo dnf -y install python creates=/usr/bin/python
|
|
|
|
ignore_errors: yes
|
|
|
|
when: systempython2.stat.exists is undefined or systempython2.stat.exists == false
|
|
|
|
- name: gathering facts
|
|
|
|
setup:
|
|
|
|
- name: install required packages for Fedora > 23
|
|
|
|
raw: sudo dnf -y install python2-dnf libselinux-python ntp
|
|
|
|
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int >= 23
|
|
|
|
|
2014-03-04 02:08:51 +08:00
|
|
|
- hosts: mons
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-04 19:36:46 +08:00
|
|
|
become: True
|
2014-03-04 02:08:51 +08:00
|
|
|
roles:
|
2014-07-08 21:39:42 +08:00
|
|
|
- ceph-mon
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2016-02-16 20:09:54 +08:00
|
|
|
- hosts: agents
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-16 20:09:54 +08:00
|
|
|
become: True
|
|
|
|
roles:
|
|
|
|
- ceph-agent
|
|
|
|
|
2014-03-04 02:08:51 +08:00
|
|
|
- hosts: osds
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-04 19:36:46 +08:00
|
|
|
become: True
|
2014-03-04 02:08:51 +08:00
|
|
|
roles:
|
2014-07-08 21:39:42 +08:00
|
|
|
- ceph-osd
|
2014-03-06 15:49:46 +08:00
|
|
|
|
|
|
|
- hosts: mdss
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-04 19:36:46 +08:00
|
|
|
become: True
|
2014-03-06 15:49:46 +08:00
|
|
|
roles:
|
2014-07-08 21:39:42 +08:00
|
|
|
- ceph-mds
|
2014-03-06 20:54:37 +08:00
|
|
|
|
|
|
|
- hosts: rgws
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-04 19:36:46 +08:00
|
|
|
become: True
|
2014-03-06 20:54:37 +08:00
|
|
|
roles:
|
2015-07-25 00:14:59 +08:00
|
|
|
- ceph-rgw
|
2015-11-27 02:57:16 +08:00
|
|
|
|
2016-05-06 02:20:03 +08:00
|
|
|
- hosts: nfss
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-05-06 02:20:03 +08:00
|
|
|
become: True
|
|
|
|
roles:
|
|
|
|
- ceph-nfs
|
|
|
|
|
2015-11-27 02:57:16 +08:00
|
|
|
- hosts: restapis
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-02-04 19:36:46 +08:00
|
|
|
become: True
|
2015-11-27 02:57:16 +08:00
|
|
|
roles:
|
|
|
|
- ceph-restapi
|
2016-04-04 06:35:09 +08:00
|
|
|
|
|
|
|
- hosts: rbdmirrors
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-04-04 06:35:09 +08:00
|
|
|
become: True
|
|
|
|
roles:
|
|
|
|
- ceph-rbd-mirror
|
2016-05-11 00:29:27 +08:00
|
|
|
|
|
|
|
- hosts: clients
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-05-11 00:29:27 +08:00
|
|
|
become: True
|
|
|
|
roles:
|
|
|
|
- ceph-client
|
2016-08-26 21:22:47 +08:00
|
|
|
|
|
|
|
- hosts: iscsigws
|
2016-10-12 12:03:52 +08:00
|
|
|
gather_facts: false
|
2016-08-26 21:22:47 +08:00
|
|
|
become: True
|
|
|
|
roles:
|
|
|
|
- ceph-iscsi-gw
|
2017-03-16 17:17:08 +08:00
|
|
|
|
|
|
|
- hosts: mgrs
|
|
|
|
gather_facts: false
|
|
|
|
become: True
|
|
|
|
roles:
|
2017-05-04 17:14:58 +08:00
|
|
|
- { role: ceph-mgr, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" }
|