-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathautomount-nasbox.yml
More file actions
38 lines (34 loc) · 852 Bytes
/
automount-nasbox.yml
File metadata and controls
38 lines (34 loc) · 852 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
34
35
36
37
38
---
- hosts: localhost
become: true
tasks:
- name: Setup automount of /nas
file:
path: /nas
state: directory
mode: 0755
- copy:
content: |
[Unit]
Description=NASBOX ISOS mount
[Mount]
What=nasbox.cluster.net:/volume2/isos
Where=/nas
Type=nfs
[Install]
WantedBy=multi-user.target
dest: /etc/systemd/system/nas.mount
- copy:
content: |
[Unit]
Description=NASBOX ISOS automount
[Automount]
Where=/nas
[Install]
WantedBy=multi-user.target
dest: /etc/systemd/system/nas.automount
- systemd:
daemon_reload: yes
unit: nas.automount
enabled: true
state: started