mirror of https://github.com/ceph/ceph-ansible.git
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
---
|
|
- name: create mgr directory
|
|
file:
|
|
path: /var/lib/ceph/mgr/
|
|
state: directory
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0755"
|
|
|
|
- name: create mgr directory
|
|
file:
|
|
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}
|
|
state: directory
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0755"
|
|
|
|
- name: copy mgr key
|
|
copy:
|
|
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.mgr.{{ ansible_hostname }}.keyring"
|
|
dest: "/var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring"
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0600"
|
|
when:
|
|
- cephx
|
|
|
|
- name: set mgr key permissions
|
|
file:
|
|
path: /var/lib/ceph/mgr/{{ cluster }}-{{ ansible_hostname }}/keyring
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0600"
|
|
when:
|
|
- cephx
|
|
|
|
- name: ensure systemd service override directory exists
|
|
file:
|
|
state: directory
|
|
path: "/etc/systemd/system/ceph-mgr@.service.d/"
|
|
when:
|
|
- ceph_mgr_systemd_overrides is defined
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
- name: add ceph-mgr systemd service overrides
|
|
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_service_mgr == 'systemd'
|
|
|
|
- name: start and add that the mgr service to the init sequence
|
|
service:
|
|
name: "ceph-mgr@{{ ansible_hostname }}"
|
|
state: started
|
|
enabled: yes
|
|
changed_when: false
|