2017-07-29 07:00:06 +08:00
|
|
|
---
|
|
|
|
# These checks are used to avoid running handlers at initial deployment.
|
|
|
|
- name: check for a ceph socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: socket
|
|
|
|
|
|
|
|
- name: check for a ceph socket in containerized deployment (osds)
|
|
|
|
shell: |
|
|
|
|
docker exec ceph-osd-"{{ ansible_hostname }}"-"{{ item | replace('/', '') }}" bash -c 'stat /var/run/ceph/*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: socket_osd_container
|
|
|
|
with_items: "{{ devices }}"
|
|
|
|
when:
|
|
|
|
- containerized_deployment
|
2017-08-04 22:57:46 +08:00
|
|
|
- inventory_hostname in groups.get(osd_group_name, [])
|