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: pacman_utils:
- nfs-utils - nfs-utils
- samba - samba
@ -31,6 +31,7 @@ pacman_office:
- firefox - firefox
- firefox-i18n-fr - firefox-i18n-fr
- chromium - chromium
- qutebrowser
- inkscape - inkscape
- pstoedit # Enable latex in inkscape - pstoedit # Enable latex in inkscape
- thunderbird - thunderbird
@ -53,6 +54,7 @@ pacman_work:
- gnuplot - gnuplot
- auto-multiple-choice - auto-multiple-choice
- xournalpp - xournalpp
- obs-studio
pacman_media: pacman_media:
- vlc - vlc
@ -94,13 +96,13 @@ pacman_programming:
pacman_pkgs: pacman_pkgs:
- "{{ pacman_utils }}" - "{{ pacman_utils }}"
# - "{{ pacman_cli }}" - "{{ pacman_cli }}"
# - "{{ pacman_terms }}" - "{{ pacman_terms }}"
# - "{{ pacman_office }}" - "{{ pacman_office }}"
# - "{{ pacman_media }}" - "{{ pacman_media }}"
# - "{{ pacman_work }}" - "{{ pacman_work }}"
# - "{{ pacman_3Dprint }}" - "{{ pacman_3Dprint }}"
# - "{{ pacman_fonts }}" - "{{ pacman_fonts }}"
aur_utils: aur_utils:
- autofs - autofs
@ -120,5 +122,10 @@ aur_work:
aur_pkgs: aur_pkgs:
- "{{ aur_utils }}" - "{{ aur_utils }}"
# - "{{ aur_fonts }}" - "{{ aur_fonts }}"
# - "{{ aur_work }}" - "{{ 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 - name: Converge
hosts: all 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: tasks:
- name: "Include workstation" - name: "Include workstation"
include_role: 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 }}"