2014-03-04 02:08:51 +08:00
|
|
|
---
|
2019-03-20 14:46:23 +08:00
|
|
|
- name: handlers
|
2019-12-02 16:47:21 +08:00
|
|
|
when:
|
|
|
|
- not rolling_update | bool
|
|
|
|
- not docker2podman | default(False) | bool
|
2019-03-20 14:46:23 +08:00
|
|
|
block:
|
2019-11-29 01:28:53 +08:00
|
|
|
- name: make tempdir for scripts
|
|
|
|
tempfile:
|
|
|
|
state: directory
|
|
|
|
prefix: ceph_ansible
|
|
|
|
listen:
|
|
|
|
- "restart ceph mons"
|
|
|
|
- "restart ceph osds"
|
|
|
|
- "restart ceph mdss"
|
|
|
|
- "restart ceph rgws"
|
|
|
|
- "restart ceph nfss"
|
|
|
|
- "restart ceph rbdmirrors"
|
|
|
|
- "restart ceph mgrs"
|
|
|
|
- "restart ceph tcmu-runner"
|
|
|
|
- "restart ceph rbd-target-api-gw"
|
|
|
|
register: tmpdirpath
|
|
|
|
when: tmpdirpath is not defined or tmpdirpath.path is not defined or tmpdirpath.state=="absent"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: mons handler
|
|
|
|
include_tasks: handler_mons.yml
|
2019-07-09 22:03:26 +08:00
|
|
|
when: mon_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph mons"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: osds handler
|
|
|
|
include_tasks: handler_osds.yml
|
2019-07-09 22:03:26 +08:00
|
|
|
when: osd_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph osds"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: mdss handler
|
|
|
|
include_tasks: handler_mdss.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: mds_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph mdss"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: rgws handler
|
|
|
|
include_tasks: handler_rgws.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: rgw_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph rgws"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: nfss handler
|
|
|
|
include_tasks: handler_nfss.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: nfs_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph nfss"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: rbdmirrors handler
|
|
|
|
include_tasks: handler_rbdmirrors.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: rbdmirror_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph rbdmirrors"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: mgrs handler
|
|
|
|
include_tasks: handler_mgrs.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: mgr_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph mgrs"
|
|
|
|
|
2019-10-10 01:58:33 +08:00
|
|
|
- name: tcmu-runner handler
|
|
|
|
include_tasks: handler_tcmu_runner.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: iscsi_gw_group_name in group_names
|
2019-03-20 14:46:23 +08:00
|
|
|
listen: "restart ceph tcmu-runner"
|
|
|
|
|
2019-10-10 04:50:09 +08:00
|
|
|
- name: rbd-target-api and rbd-target-gw handler
|
|
|
|
include_tasks: handler_rbd_target_api_gw.yml
|
2019-04-01 23:46:15 +08:00
|
|
|
when: iscsi_gw_group_name in group_names
|
2019-10-10 04:50:09 +08:00
|
|
|
listen: "restart ceph rbd-target-api-gw"
|
2019-11-29 01:28:53 +08:00
|
|
|
|
|
|
|
- name: remove tempdir for scripts
|
|
|
|
file:
|
|
|
|
path: "{{ tmpdirpath.path }}"
|
|
|
|
state: absent
|
|
|
|
listen:
|
|
|
|
- "restart ceph mons"
|
|
|
|
- "restart ceph osds"
|
|
|
|
- "restart ceph mdss"
|
|
|
|
- "restart ceph rgws"
|
|
|
|
- "restart ceph nfss"
|
|
|
|
- "restart ceph rbdmirrors"
|
|
|
|
- "restart ceph mgrs"
|
|
|
|
- "restart ceph tcmu-runner"
|
|
|
|
- "restart ceph rbd-target-api-gw"
|
|
|
|
register: tmpdirpath
|
|
|
|
when: tmpdirpath is defined
|