ceph-ansible/roles/ceph-handler/tasks/handler_mdss.yml

28 lines
811 B
YAML

---
- name: set _mds_handler_called before restart
set_fact:
_mds_handler_called: True
- name: copy mds restart script
template:
src: restart_mds_daemon.sh.j2
dest: "{{ tmpdirpath.path }}/restart_mds_daemon.sh"
owner: root
group: root
mode: 0750
when: tmpdirpath.path is defined
- name: restart ceph mds daemon(s)
command: /usr/bin/env bash {{ hostvars[item]['tmpdirpath']['path'] }}/restart_mds_daemon.sh
when:
- hostvars[item]['handler_mds_status'] | default(False) | bool
- hostvars[item]['_mds_handler_called'] | default(False) | bool
- hostvars[item].tmpdirpath.path is defined
with_items: "{{ groups[mds_group_name] }}"
delegate_to: "{{ item }}"
run_once: True
- name: set _mds_handler_called after restart
set_fact:
_mds_handler_called: False