# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mon_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(mon_group_name) | last
+ - inventory_hostname in play_hosts
- mon_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mon_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mon_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(mon_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_mon_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mon_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
when:
- osd_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(osd_group_name) | last
# We do not want to run these checks on initial deployment (`socket_osd_container.results[n].rc == 0`)
# except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified
- ((crush_location is defined and crush_location) or osd_socket_stat.rc == 0)
- handler_health_osd_check
# See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below
- inventory_hostname in play_hosts
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[osd_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified
- osd_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(osd_group_name) | last
- ((crush_location is defined and crush_location) or ceph_osd_container_stat.get('stdout_lines', [])|length != 0)
- handler_health_osd_check
# See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below
- inventory_hostname in play_hosts
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[osd_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mds_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(mds_group_name) | last
+ - inventory_hostname in play_hosts
- mds_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mds_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mds_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(mds_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_mds_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mds_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rgw_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(rgw_group_name) | last
+ - inventory_hostname in play_hosts
- rgw_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[rgw_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rgw_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(rgw_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_rgw_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[rgw_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- nfs_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(nfs_group_name) | last
+ - inventory_hostname in play_hosts
- nfs_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[nfs_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- nfs_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(nfs_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_nfs_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[nfs_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rbdmirror_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(rbdmirror_group_name) | last
+ - inventory_hostname in play_hosts
- rbd_mirror_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[rbdmirror_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- rbdmirror_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(rbdmirror_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_rbd_mirror_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[rbdmirror_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mgr_group_name in group_names
- not containerized_deployment
+ - inventory_hostname == groups.get(mgr_group_name) | last
+ - inventory_hostname in play_hosts
- mgr_socket_stat.rc == 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mgr_group_name] }}"
run_once: true
delegate_to: "{{ item }}"
# We do not want to run these checks on initial deployment (`socket.rc == 0`)
- mgr_group_name in group_names
- containerized_deployment
+ - inventory_hostname == groups.get(mgr_group_name) | last
+ - inventory_hostname in play_hosts
- ceph_mgr_container_stat.get('stdout_lines', [])|length != 0
- with_items: "{{ ansible_play_batch }}"
+ with_items: "{{ groups[mgr_group_name] }}"
run_once: true
delegate_to: "{{ item }}"