Feat: move autofs to workstation

This commit is contained in:
Bertrand Benjamin 2022-01-10 05:26:00 +01:00
parent 8927cc07e6
commit 4bd12d5001
4 changed files with 47 additions and 10 deletions

View File

@ -1,5 +1,5 @@
---
# defaults file for workstation
# defaults packages for workstation
pacman_utils:
- nfs-utils
- samba
@ -31,6 +31,7 @@ pacman_office:
- firefox
- firefox-i18n-fr
- chromium
- qutebrowser
- inkscape
- pstoedit # Enable latex in inkscape
- thunderbird
@ -53,6 +54,7 @@ pacman_work:
- gnuplot
- auto-multiple-choice
- xournalpp
- obs-studio
pacman_media:
- vlc
@ -94,13 +96,13 @@ pacman_programming:
pacman_pkgs:
- "{{ pacman_utils }}"
# - "{{ pacman_cli }}"
# - "{{ pacman_terms }}"
# - "{{ pacman_office }}"
# - "{{ pacman_media }}"
# - "{{ pacman_work }}"
# - "{{ pacman_3Dprint }}"
# - "{{ pacman_fonts }}"
- "{{ pacman_cli }}"
- "{{ pacman_terms }}"
- "{{ pacman_office }}"
- "{{ pacman_media }}"
- "{{ pacman_work }}"
- "{{ pacman_3Dprint }}"
- "{{ pacman_fonts }}"
aur_utils:
- autofs
@ -120,5 +122,10 @@ aur_work:
aur_pkgs:
- "{{ aur_utils }}"
# - "{{ aur_fonts }}"
# - "{{ aur_work }}"
- "{{ aur_fonts }}"
- "{{ aur_work }}"
# Autofs
autofs:
host: nas

View 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

View File

@ -1,6 +1,16 @@
---
- name: Converge
hosts: all
vars:
pacman_pkgs:
- "{{ pacman_utils }}"
aur_pkgs:
- "{{ aur_utils }}"
pre_tasks:
- name: Install pkgs
community.general.pacman:
update_cache: true
become: true
tasks:
- name: "Include workstation"
include_role:

View 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 }}"