Mohammed Naser | 0003fd0 | 2022-03-12 15:38:24 -0500 | [diff] [blame] | 1 | # Copyright (c) 2022 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
| 15 | - name: install packages |
| 16 | ansible.builtin.apt: |
| 17 | name: ["ceph-mgr"] |
| 18 | install_recommends: false |
| 19 | |
| 20 | - name: create manager folder |
| 21 | ansible.builtin.file: |
| 22 | path: "/var/lib/ceph/mgr/ceph-{{ inventory_hostname_short }}" |
| 23 | state: directory |
Mohammed Naser | 511c3fa | 2022-03-17 17:54:10 -0400 | [diff] [blame] | 24 | owner: ceph |
| 25 | group: ceph |
| 26 | mode: 0700 |
Mohammed Naser | 0003fd0 | 2022-03-12 15:38:24 -0500 | [diff] [blame] | 27 | |
Mohammed Naser | 511c3fa | 2022-03-17 17:54:10 -0400 | [diff] [blame] | 28 | - name: Create Ceph manager keyring |
| 29 | vexxhost.atmosphere.ceph_key: |
| 30 | name: "mgr.{{ inventory_hostname_short }}" |
| 31 | dest: "/var/lib/ceph/mgr/ceph-{{ inventory_hostname_short }}/keyring" |
| 32 | caps: |
| 33 | mon: allow profile mgr |
| 34 | osd: allow * |
| 35 | mds: allow * |
| 36 | owner: ceph |
| 37 | group: ceph |
Mohammed Naser | 0003fd0 | 2022-03-12 15:38:24 -0500 | [diff] [blame] | 38 | |
| 39 | - name: ensure permissions are fixed |
| 40 | ansible.builtin.file: |
| 41 | path: "/var/lib/ceph/mon/ceph-{{ inventory_hostname_short }}" |
| 42 | owner: ceph |
| 43 | group: ceph |
Mohammed Naser | 511c3fa | 2022-03-17 17:54:10 -0400 | [diff] [blame] | 44 | recurse: true |
Mohammed Naser | 0003fd0 | 2022-03-12 15:38:24 -0500 | [diff] [blame] | 45 | |
| 46 | - name: enable and start service |
| 47 | ansible.builtin.service: |
| 48 | name: "ceph-mgr@{{ inventory_hostname_short }}" |
| 49 | state: started |
Mohammed Naser | 511c3fa | 2022-03-17 17:54:10 -0400 | [diff] [blame] | 50 | enabled: true |