This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.yml
71 lines (56 loc) · 1.46 KB
/
main.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
- name: Set up cluster-wide configuration.
hosts: cluster
gather_facts: false
become: true
handlers:
- name: reboot-pi
reboot:
vars_files:
- config.yml
tasks: []
- name: Configure the control plane (node 1).
hosts: control_plane
gather_facts: false
become: true
vars_files:
- config.yml
tasks:
# See: https://forums.raspberrypi.com/viewtopic.php?t=274486
- name: Set up the Debian unstable repo (TODO).
meta: noop
# See: https://ceph.com/en/news/blog/2022/install-ceph-in-a-raspberrypi-4-cluster/
- name: Install cephadm (TODO).
meta: noop
- name: Create the ceph cluster (TODO).
meta: noop
- name: Retrieve the ceph pubkey.
ansible.builtin.fetch:
src: /etc/ceph/ceph.pub
dest: files/ceph.pub
flat: yes
- name: Ensure NFS dependencies are installed.
ansible.builtin.package:
name:
- libcephfs2
- nfs-ganesha
- nfs-ganesha-ceph
state: present
- name: Configure the nodes (nodes 2-6).
hosts: nodes
gather_facts: false
become: true
vars_files:
- config.yml
tasks:
- name: Ensure Ceph dependencies are installed.
ansible.builtin.package:
name:
- podman
- lvm2
state: present
- name: Copy the ceph pubkey to each node.
ansible.posix.authorized_key:
user: root
state: present
key: "{{ lookup('file', 'files/ceph.pub') }}"