Feat: shares with autofs
This commit is contained in:
parent
8c81fcd2a2
commit
640a892920
@ -3,3 +3,6 @@ me:
|
||||
username: 'user1'
|
||||
|
||||
config2stow: ["nvim", "tmux", "zsh"]
|
||||
|
||||
autofs:
|
||||
- host: nas
|
||||
|
2
roles/dotfiles/files/autofs.nas
Normal file
2
roles/dotfiles/files/autofs.nas
Normal file
@ -0,0 +1,2 @@
|
||||
Nas_commun -rw,soft,intr,rsize=8192,wsize=8192 nas:/mnt/DocNas/Commun
|
||||
Nas_perso -rw,soft,intr,rsize=8192,wsize=8192 nas:/mnt/DocNas/Benjamin
|
@ -3,12 +3,10 @@
|
||||
community.general.pacman:
|
||||
name: stow
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: true
|
||||
|
||||
- name: Install git
|
||||
community.general.pacman:
|
||||
name: git
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: true
|
||||
|
18
roles/dotfiles/tasks/home_mounts.yml
Normal file
18
roles/dotfiles/tasks/home_mounts.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Create NAS share directory
|
||||
file:
|
||||
path: "/media/{{ item.host }}"
|
||||
state: directory
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: Activate NAS shares for autofs
|
||||
lineinfile:
|
||||
path: /etc/autofs/auto.master
|
||||
line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse"
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: NAS autofs config file
|
||||
template:
|
||||
src: "files/autofs.{{ item.host }}"
|
||||
dest: "/etc/autofs/auto.{{ item.host }}"
|
||||
with_items: "{{ autofs }}"
|
@ -22,6 +22,9 @@
|
||||
become: true
|
||||
become_user: "{{ me.username}}"
|
||||
|
||||
- name: home mounts
|
||||
import_tasks: home_mounts.yml
|
||||
|
||||
- name: Gnome config
|
||||
import_tasks: gnome.yml
|
||||
become: true
|
||||
|
Loading…
Reference in New Issue
Block a user