blob: 7b0a56dcfd16dd772fd90da51c85c9caf6be4118 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
---
- name: Install Ceph Packages
ansible.builtin.apt:
name:
- ceph-common
- ceph-fuse
state: present
- name: Copy Ceph Configuration
ansible.builtin.copy:
content: |
[global]
fsid = {{ ceph_fsid }}
mon_host = {{ ceph_mon_host }}
client_permissions = false
dest: /etc/ceph/ceph.conf
mode: '0644'
- name: Copy Ceph Keyring
ansible.builtin.copy:
content: |
[client.{{ ceph_client_name }}]
key = {{ ceph_secret }}
dest: "/etc/ceph/ceph.client.{{ ceph_client_name }}.keyring"
mode: '0600'
- name: Ensure Ceph Base Exists
ansible.builtin.file:
path: "{{ ceph_base }}"
owner: root
group: root
state: directory
recurse: true
- name: Mount Ceph on Boot
ansible.builtin.lineinfile:
path: /etc/fstab
regexp: '{{ ceph_base }}\w+fuse.ceph'
line: "none {{ ceph_base }} fuse.ceph ceph.id={{ ceph_client_name }},_netdev,defaults 0 0"
create: true
mode: "0644"
- name: Mount Ceph Now
ansible.builtin.command: mount -a
|