-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuperPiWorkerNFS.yml
More file actions
33 lines (33 loc) · 871 Bytes
/
SuperPiWorkerNFS.yml
File metadata and controls
33 lines (33 loc) · 871 Bytes
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
- hosts: superpiworkers
remote_user: pi
become: 'yes'
tasks:
- name: NFS Client Install
apt:
pkg:
- nfs-common
- name: Create the mountpoint
file:
path: /mnt/usb1
state: directory
owner: nobody
group: nogroup
mode: '0777'
- name: Create the second mountpoint
file:
path: /mnt/usb2
state: directory
owner: nobody
group: nogroup
mode: '0777'
- name: Edit fstab to use systemd automount
blockinfile:
path: /etc/fstab
block: |
superpi1:/mnt/usb1 /mnt/usb1 nfs defaults,noauto,x-systemd.automount 0 0
superpi1:/mnt/usb2 /mnt/usb2 nfs defaults,noauto,x-systemd.automount 0 0
- name: Enable nfs-common
systemd:
name: nfs-common
state: enabled
masked: no