blob: 477e5c44395543f7fdd6096f7906f0e33e835597 (
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
|
tasks:
- vip:
# make sure cephadm notices the new IP
- cephadm.shell:
host.a:
- ceph orch device ls --refresh
# stop kernel nfs server, if running
- vip.exec:
all-hosts:
- systemctl stop nfs-server
# use nfs module to create cluster and export
- cephadm.shell:
host.a:
- ceph fs volume create fs1
- ceph nfs cluster create happy --ingress --virtual-ip={{VIP0}} --ingress-mode=haproxy-protocol
- ceph nfs export create cephfs --fsname fs1 --cluster-id happy --pseudo-path /d1
# wait for services to start
- cephadm.wait_for_service:
service: nfs.happy
- cephadm.wait_for_service:
service: ingress.nfs.happy
# make sure mount can be reached over VIP, ensuring both that
# keepalived is maintaining the VIP and that the nfs has bound to it
- vip.exec:
host.a:
- mkdir /mnt/happy
- sleep 1
- mount -t nfs {{VIP0}}:/d1 /mnt/happy
- echo test > /mnt/happy/testfile
- sync
|