Feat: shares with autofs
This commit is contained in:
parent
8c81fcd2a2
commit
640a892920
@ -3,3 +3,6 @@ me:
|
|||||||
username: 'user1'
|
username: 'user1'
|
||||||
|
|
||||||
config2stow: ["nvim", "tmux", "zsh"]
|
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:
|
community.general.pacman:
|
||||||
name: stow
|
name: stow
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Install git
|
- name: Install git
|
||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name: git
|
name: git
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
|
||||||
become: true
|
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: true
|
||||||
become_user: "{{ me.username}}"
|
become_user: "{{ me.username}}"
|
||||||
|
|
||||||
|
- name: home mounts
|
||||||
|
import_tasks: home_mounts.yml
|
||||||
|
|
||||||
- name: Gnome config
|
- name: Gnome config
|
||||||
import_tasks: gnome.yml
|
import_tasks: gnome.yml
|
||||||
become: true
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user