ceph-ansible/rolling_update.yml

57 lines
1.2 KiB
YAML
Raw Normal View History

---
# This playbook does a rolling update for all the Ceph services
# Change the value of serial: to adjust the number of server to be updated.
#
# The four roles that apply to the ceph hosts will be applied: ceph-common,
# ceph-mon, ceph-osd and ceph-mds. So any changes to configuration, package updates, etc,
# will be applied as part of the rolling update process.
#
# /!\ DO NOT FORGET TO CHANGE THE RELEASE VERSION FIRST! /!\
- hosts:
- mons
- osds
- mdss
- rgws
sudo: True
roles:
- ceph-common
- hosts: mons
serial: 1
sudo: True
roles:
- ceph-mon
post_tasks:
- name: restart monitor(s)
2014-09-05 03:14:11 +08:00
service: >
name=ceph
state=restarted
args=mon
- hosts: osds
serial: 1
sudo: True
roles:
- ceph-osd
post_tasks:
- name: restart object storage daemon(s)
command: service ceph-osd-all restart
when: ansible_distribution == "Ubuntu"
- name: restart object storage daemon(s)
service: name=ceph state=restarted args=osd
when: ansible_distribution == "Debian"
- hosts: mdss
serial: 1
sudo: True
roles:
- ceph-mds
post_tasks:
- name: restart metadata server(s)
2014-09-05 03:14:11 +08:00
service: >
name=ceph
state=restarted
2014-09-05 03:14:11 +08:00
args=mds