2015-01-30 23:16:18 +08:00
|
|
|
---
|
2018-10-24 00:38:40 +08:00
|
|
|
- name: waiting for the monitor(s) to form the quorum...
|
2018-11-16 17:50:38 +08:00
|
|
|
command: >
|
2019-05-14 20:51:32 +08:00
|
|
|
{{ container_exec_cmd }}
|
2018-11-16 17:50:38 +08:00
|
|
|
ceph
|
|
|
|
--cluster {{ cluster }}
|
|
|
|
-n mon.
|
|
|
|
-k /var/lib/ceph/mon/{{ cluster }}-{{ ansible_hostname }}/keyring
|
|
|
|
mon_status
|
|
|
|
--format json
|
2018-10-24 00:38:40 +08:00
|
|
|
register: ceph_health_raw
|
2018-11-16 17:50:38 +08:00
|
|
|
run_once: true
|
2018-10-24 00:38:40 +08:00
|
|
|
until: >
|
2019-10-10 03:39:04 +08:00
|
|
|
(ceph_health_raw.stdout | length > 0) and (ceph_health_raw.stdout | default('{}') | from_json)['state'] in ['leader', 'peon']
|
2018-10-24 00:38:40 +08:00
|
|
|
retries: "{{ handler_health_mon_check_retries }}"
|
|
|
|
delay: "{{ handler_health_mon_check_delay }}"
|
2019-03-02 02:53:03 +08:00
|
|
|
changed_when: false
|
2020-09-01 17:24:59 +08:00
|
|
|
when: not ansible_check_mode
|
2018-10-24 00:38:40 +08:00
|
|
|
|
2019-09-23 19:30:05 +08:00
|
|
|
- name: fetch ceph initial keys
|
|
|
|
ceph_key:
|
|
|
|
state: fetch_initial_keys
|
|
|
|
cluster: "{{ cluster }}"
|
|
|
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
|
|
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
|
|
|
mode: "0400"
|
|
|
|
environment:
|
|
|
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}"
|
|
|
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
|
|
|
CEPH_ROLLING_UPDATE: "{{ rolling_update }}"
|
|
|
|
when:
|
|
|
|
- cephx | bool
|