2017-07-29 07:00:06 +08:00
|
|
|
---
|
|
|
|
# These checks are used to avoid running handlers at initial deployment.
|
2017-09-08 05:33:45 +08:00
|
|
|
- name: check for a ceph mon socket
|
2017-07-29 07:00:06 +08:00
|
|
|
shell: |
|
2017-09-08 05:33:45 +08:00
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mon*.asok > /dev/null 2>&1'
|
2017-07-29 07:00:06 +08:00
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
2017-09-08 05:33:45 +08:00
|
|
|
register: mon_socket
|
|
|
|
|
|
|
|
- name: check for a ceph osd socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-osd*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: osd_socket
|
|
|
|
|
|
|
|
- name: check for a ceph mds socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mds*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: mds_socket
|
|
|
|
|
|
|
|
- name: check for a ceph rgw socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rgw*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: rgw_socket
|
|
|
|
|
|
|
|
- name: check for a ceph mgr socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-mgr*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: mgr_socket
|
|
|
|
|
|
|
|
- name: check for a ceph rbd mirror socket
|
|
|
|
shell: |
|
|
|
|
{{ docker_exec_cmd }} bash -c 'stat {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rbd-mirror*.asok > /dev/null 2>&1'
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
always_run: true
|
|
|
|
register: rbd_mirror_socket
|
2017-07-29 07:00:06 +08:00
|
|
|
|
|
|
|
- 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, [])
|