- mon_group_name in group_names
- not containerized_deployment
- mon_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph mon daemon(s) - container
command: /tmp/restart_mon_daemon.sh
- mon_group_name in group_names
- containerized_deployment
- ceph_mon_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
# This does not just restart OSDs but everything else too. Unfortunately
# at this time the ansible role does not have an OSD id list to use
- 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 }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph osds daemon(s) - container
command: /tmp/restart_osd_daemon.sh
- 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 }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: copy mds restart script
template:
- mds_group_name in group_names
- not containerized_deployment
- mds_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph mds daemon(s) - container
command: /tmp/restart_mds_daemon.sh
- mds_group_name in group_names
- containerized_deployment
- ceph_mds_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: copy rgw restart script
template:
- rgw_group_name in group_names
- not containerized_deployment
- rgw_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph rgw daemon(s) - container
command: /tmp/restart_rgw_daemon.sh
- rgw_group_name in group_names
- containerized_deployment
- ceph_rgw_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: copy nfs restart script
template:
- nfs_group_name in group_names
- not containerized_deployment
- nfs_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph nfs daemon(s) - container
command: /tmp/restart_nfs_daemon.sh
- nfs_group_name in group_names
- containerized_deployment
- ceph_nfs_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: copy rbd mirror restart script
template:
- rbdmirror_group_name in group_names
- not containerized_deployment
- rbd_mirror_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph rbd mirror daemon(s) - container
command: /tmp/restart_rbd_mirror_daemon.sh
- rbdmirror_group_name in group_names
- containerized_deployment
- ceph_rbd_mirror_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: copy mgr restart script
template:
- mgr_group_name in group_names
- not containerized_deployment
- mgr_socket_stat.rc == 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"
- name: restart ceph mgr daemon(s) - container
command: /tmp/restart_mgr_daemon.sh
- mgr_group_name in group_names
- containerized_deployment
- ceph_mgr_container_stat.get('stdout_lines', [])|length != 0
+ with_items: "{{ ansible_play_batch }}"
+ run_once: true
+ delegate_to: "{{ item }}"