2017-09-27 20:13:39 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Include_tasks systemd.yml
|
|
|
|
ansible.builtin.include_tasks: systemd.yml
|
2017-09-27 20:13:39 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Enable ceph-mds.target
|
|
|
|
ansible.builtin.service:
|
2021-08-10 21:21:19 +08:00
|
|
|
name: ceph-mds.target
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
daemon_reload: true
|
2021-08-10 21:21:19 +08:00
|
|
|
when: containerized_deployment | bool
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Systemd start mds container
|
|
|
|
ansible.builtin.systemd:
|
2021-03-03 22:43:50 +08:00
|
|
|
name: ceph-mds@{{ ansible_facts['hostname'] }}
|
2017-09-27 20:13:39 +08:00
|
|
|
state: started
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
masked: false
|
|
|
|
daemon_reload: true
|
2017-09-27 20:13:39 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Wait for mds socket to exist
|
|
|
|
ansible.builtin.command: "{{ container_binary }} exec ceph-mds-{{ ansible_facts['hostname'] }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_facts['hostname'] }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_facts['fqdn'] }}.asok'"
|
2018-10-30 22:51:32 +08:00
|
|
|
changed_when: false
|
2017-09-27 20:13:39 +08:00
|
|
|
register: multi_mds_socket
|
|
|
|
retries: 5
|
|
|
|
delay: 15
|
|
|
|
until: multi_mds_socket.rc == 0
|