Skip to content

Commit cf11730

Browse files
committed
autofs: automount Arq network share
Mounting the SMB share using MacOS 'Connect to Server' is unreliable and manual. If the connection drops, it can sometimes be impossible to reconnect with restarting.
1 parent 5005e92 commit cf11730

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎darwin.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
- hosts: localhost
33
roles:
4+
- { role: autofs, tags: ['autofs'] }
45
- { role: dotfiles, tags: ['dotfiles'] }
56
- { role: homebrew, tags: ['homebrew'] }
67
- { role: fonts, tags: ['fonts'] }

‎roles/autofs/description‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Install autofs mounts for Arq backup

‎roles/autofs/files/auto_synology‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Arq -fstype=smbfs,rw,noowners,noatime ://backup:timemachine@10.1.1.3/Arq

‎roles/autofs/tasks/main.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
- name: autofs | create mountpoint
3+
file: path=/mnt state=directory
4+
5+
- name: autofs | update master map
6+
lineinfile:
7+
dest: '/etc/auto_master'
8+
line: '/mnt/Synology auto_synology'
9+
10+
- name: autofs | create mount map
11+
copy:
12+
src: '{{ role_path }}/files/auto_synology'
13+
dest: '/etc/auto_synology'
14+
15+
- name: autofs | flush cache
16+
raw: sudo automount -vc

0 commit comments

Comments
 (0)