Execution
Date 14 Dec 2025 10:21:40 +0000
Duration 00:43:55.98
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.13.5
Summary
13 Hosts
2438 Tasks
2413 Results
107 Plays
511 Files
0 Records

File: /etc/ansible/roles/ceph-ansible/roles/ceph-handler/handlers/main.yml

---
- name: Handlers
  when:
    - not rolling_update | bool
    - not docker2podman | default(False) | bool
  block:
    - name: Make tempdir for scripts
      ansible.builtin.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"
      register: tmpdirpath
      when: tmpdirpath is not defined or tmpdirpath.path is not defined or tmpdirpath.state=="absent"

    - name: Mons handler
      ansible.builtin.include_tasks: handler_mons.yml
      when: mon_group_name in group_names
      listen: "Restart ceph mons"

    - name: Osds handler
      ansible.builtin.include_tasks: handler_osds.yml
      when: osd_group_name in group_names
      listen: "Restart ceph osds"

    - name: Mdss handler
      ansible.builtin.include_tasks: handler_mdss.yml
      when: mds_group_name in group_names
      listen: "Restart ceph mdss"

    - name: Rgws handler
      ansible.builtin.include_tasks: handler_rgws.yml
      when: rgw_group_name in group_names
      listen: "Restart ceph rgws"

    - name: Nfss handler
      ansible.builtin.include_tasks: handler_nfss.yml
      when: nfs_group_name in group_names
      listen: "Restart ceph nfss"

    - name: Rbdmirrors handler
      ansible.builtin.include_tasks: handler_rbdmirrors.yml
      when: rbdmirror_group_name in group_names
      listen: "Restart ceph rbdmirrors"

    - name: Mgrs handler
      ansible.builtin.include_tasks: handler_mgrs.yml
      when: mgr_group_name in group_names
      listen: "Restart ceph mgrs"

    - name: Ceph crash handler
      ansible.builtin.include_tasks: handler_crash.yml
      listen: "Restart ceph crash"
      when:
        - inventory_hostname in groups.get(mon_group_name, [])
          or inventory_hostname in groups.get(mgr_group_name, [])
          or inventory_hostname in groups.get(osd_group_name, [])
          or inventory_hostname in groups.get(mds_group_name, [])
          or inventory_hostname in groups.get(rgw_group_name, [])
          or inventory_hostname in groups.get(rbdmirror_group_name, [])

    - name: Ceph exporter handler
      ansible.builtin.include_tasks: handler_exporter.yml
      listen: "Restart ceph exporter"
      when:
        - inventory_hostname in groups.get(mon_group_name, [])
          or inventory_hostname in groups.get(mgr_group_name, [])
          or inventory_hostname in groups.get(osd_group_name, [])
          or inventory_hostname in groups.get(mds_group_name, [])
          or inventory_hostname in groups.get(rgw_group_name, [])
          or inventory_hostname in groups.get(rbdmirror_group_name, [])