Execution
Date 08 Dec 2025 13:33:24 +0000
Duration 00:06:14.05
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.3
Summary
2 Hosts
374 Tasks
364 Results
37 Plays
208 Files
0 Records

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

---
- name: Include check_running_cluster.yml
  ansible.builtin.include_tasks: check_running_cluster.yml

# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- name: Set_fact handler_mon_status
  ansible.builtin.set_fact:
    handler_mon_status: "{{ 0 in (mon_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_mon_container_stat.get('rc') == 0 and ceph_mon_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(mon_group_name, [])

- name: Set_fact handler_osd_status
  ansible.builtin.set_fact:
    handler_osd_status: "{{ 0 in (osd_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_osd_container_stat.get('rc') == 0 and ceph_osd_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(osd_group_name, [])

- name: Set_fact handler_mds_status
  ansible.builtin.set_fact:
    handler_mds_status: "{{ 0 in (mds_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_mds_container_stat.get('rc') == 0 and ceph_mds_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(mds_group_name, [])

- name: Set_fact handler_rgw_status
  ansible.builtin.set_fact:
    handler_rgw_status: "{{ 0 in (rgw_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_rgw_container_stat.get('rc') == 0 and ceph_rgw_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(rgw_group_name, [])

- name: Set_fact handler_nfs_status
  ansible.builtin.set_fact:
    handler_nfs_status: "{{ (nfs_process.get('rc') == 0) if not containerized_deployment | bool else (ceph_nfs_container_stat.get('rc') == 0 and ceph_nfs_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(nfs_group_name, [])

- name: Set_fact handler_rbd_status
  ansible.builtin.set_fact:
    handler_rbd_mirror_status: "{{ 0 in (rbd_mirror_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_rbd_mirror_container_stat.get('rc') == 0 and ceph_rbd_mirror_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(rbdmirror_group_name, [])

- name: Set_fact handler_mgr_status
  ansible.builtin.set_fact:
    handler_mgr_status: "{{ 0 in (mgr_socket.results | map(attribute='rc') | list) if not containerized_deployment | bool else (ceph_mgr_container_stat.get('rc') == 0 and ceph_mgr_container_stat.get('stdout_lines', []) | length != 0) }}"
  when: inventory_hostname in groups.get(mgr_group_name, [])

- name: Set_fact handler_crash_status
  ansible.builtin.set_fact:
    handler_crash_status: "{{ crash_process.get('rc') == 0 if not containerized_deployment | bool else (ceph_crash_container_stat.get('rc') == 0 and ceph_crash_container_stat.get('stdout_lines', []) | length != 0) }}"
  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: Set_fact handler_exporter_status
  ansible.builtin.set_fact:
    handler_exporter_status: "{{ exporter_process.get('rc') == 0 if not containerized_deployment | bool else (ceph_exporter_container_stat.get('rc') == 0 and ceph_exporter_container_stat.get('stdout_lines', []) | length != 0) }}"
  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, [])