mirror of https://github.com/ceph/ceph-ansible.git
31 lines
878 B
YAML
31 lines
878 B
YAML
---
|
|
- name: set_fact container_exec_cmd mds
|
|
set_fact:
|
|
container_exec_cmd: "{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}"
|
|
|
|
- name: generate systemd unit file
|
|
become: true
|
|
template:
|
|
src: "{{ role_path }}/templates/ceph-mds.service.j2"
|
|
dest: /etc/systemd/system/ceph-mds@.service
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0644"
|
|
notify: restart ceph mdss
|
|
|
|
- name: systemd start mds container
|
|
systemd:
|
|
name: ceph-mds@{{ ansible_hostname }}
|
|
state: started
|
|
enabled: yes
|
|
masked: no
|
|
daemon_reload: yes
|
|
|
|
- name: wait for mds socket to exist
|
|
command: "{{ container_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_fqdn }}.asok'"
|
|
changed_when: false
|
|
register: multi_mds_socket
|
|
retries: 5
|
|
delay: 15
|
|
until: multi_mds_socket.rc == 0
|