ceph-ansible/roles/ceph-mgr/tasks/start_mgr.yml

39 lines
1.1 KiB
YAML

---
- name: Ensure systemd service override directory exists
ansible.builtin.file:
state: directory
path: "/etc/systemd/system/ceph-mgr@.service.d/"
mode: "0755"
when:
- ceph_mgr_systemd_overrides is defined
- ansible_facts['service_mgr'] == 'systemd'
- name: Add ceph-mgr systemd service overrides
openstack.config_template.config_template:
src: "ceph-mgr.service.d-overrides.j2"
dest: "/etc/systemd/system/ceph-mgr@.service.d/ceph-mgr-systemd-overrides.conf"
config_overrides: "{{ ceph_mgr_systemd_overrides | default({}) }}"
config_type: "ini"
when:
- ceph_mgr_systemd_overrides is defined
- ansible_facts['service_mgr'] == 'systemd'
- name: Include_tasks systemd.yml
ansible.builtin.include_tasks: systemd.yml
when: containerized_deployment | bool
- name: Enable ceph-mgr.target
ansible.builtin.service:
name: ceph-mgr.target
enabled: true
daemon_reload: true
when: containerized_deployment | bool
- name: Systemd start mgr
ansible.builtin.systemd:
name: ceph-mgr@{{ ansible_facts['hostname'] }}
state: started
enabled: true
masked: false
daemon_reload: true