]>
Commit | Line | Data |
---|---|---|
aee94f69 TL |
1 | tasks: |
2 | - vip: | |
3 | ||
4 | # make sure cephadm notices the new IP | |
5 | - cephadm.shell: | |
6 | host.a: | |
7 | - ceph orch device ls --refresh | |
8 | ||
9 | # stop kernel nfs server, if running | |
10 | - vip.exec: | |
11 | all-hosts: | |
12 | - systemctl stop nfs-server | |
13 | ||
14 | # use nfs module to create cluster and export | |
15 | - cephadm.shell: | |
16 | host.a: | |
17 | - ceph fs volume create fs1 | |
18 | - ceph nfs cluster create happy --ingress --virtual-ip={{VIP0}} --ingress-mode=haproxy-protocol | |
19 | - ceph nfs export create cephfs --fsname fs1 --cluster-id happy --pseudo-path /d1 | |
20 | ||
21 | # wait for services to start | |
22 | - cephadm.wait_for_service: | |
23 | service: nfs.happy | |
24 | - cephadm.wait_for_service: | |
25 | service: ingress.nfs.happy | |
26 | ||
27 | # make sure mount can be reached over VIP, ensuring both that | |
28 | # keepalived is maintaining the VIP and that the nfs has bound to it | |
29 | - vip.exec: | |
30 | host.a: | |
31 | - mkdir /mnt/happy | |
32 | - sleep 1 | |
33 | - mount -t nfs {{VIP0}}:/d1 /mnt/happy | |
34 | - echo test > /mnt/happy/testfile | |
35 | - sync |