From 5b484fa40dba344eb101533c5169b76df1a4439c Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Wed, 20 Mar 2024 12:56:09 +0100 Subject: [PATCH] Add nfs server --- research-cloud-plugin.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/research-cloud-plugin.yml b/research-cloud-plugin.yml index a2295682..e5116f40 100644 --- a/research-cloud-plugin.yml +++ b/research-cloud-plugin.yml @@ -122,6 +122,34 @@ autoclean: true autoremove: true + - name: Setup nfs server + when: worker_ip_addresses + block: + -name: nfs-server + apt: + name: + - nfs-common + - nfs-kernel-server + state: present + - name: nfs export /home + lineinfile: + path: /etc/exports + line: "/home {{ item }}(rw,async,no_subtree_check)" + create: yes + loop: '{{ worker_ip_addresses }}' + - name: nfs export /mnt/data + lineinfile: + path: /etc/exports + line: "/mnt/data {{ item }}(ro,async,no_subtree_check)" + create: yes + loop: '{{ worker_ip_addresses }}' + - name: nfsd service + service: + name: nfs-kernel-server + state: started + state: started + enabled: true + - name: Debug debug: msg: The eWaterCycle Jupyter plugin has completed