blob: 9ee70eee9eac07f3099d7b36428d87438c65ae5b [file] [log] [blame]
# Copyright (c) 2022 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Install packages
ansible.builtin.apt:
name: ["ceph-mgr"]
install_recommends: false
- name: Create manager folder
ansible.builtin.file:
path: "/var/lib/ceph/mgr/ceph-{{ inventory_hostname_short }}"
state: directory
owner: ceph
group: ceph
mode: "0700"
- name: Create Ceph manager keyring
vexxhost.atmosphere.ceph_key:
name: "mgr.{{ inventory_hostname_short }}"
dest: "/var/lib/ceph/mgr/ceph-{{ inventory_hostname_short }}/keyring"
caps:
mon: allow profile mgr
osd: allow *
mds: allow *
owner: ceph
group: ceph
- name: Ensure permissions are fixed
ansible.builtin.file:
path: "/var/lib/ceph/mon/ceph-{{ inventory_hostname_short }}"
owner: ceph
group: ceph
recurse: true
- name: Enable and start service
ansible.builtin.service:
name: "ceph-mgr@{{ inventory_hostname_short }}"
state: started
enabled: true