Add autofs

This commit is contained in:
Przemek Grondek 2023-08-22 21:10:54 +02:00
parent 10ff873b4a
commit b077697687
10 changed files with 39 additions and 15 deletions

View File

@ -19,5 +19,6 @@
- terraform
- no-snap
- flutter
- autofs
vars:
desktop_src_dir: "{{ ansible_user_dir }}/src/desktop"

View File

@ -0,0 +1 @@
/media/bender /etc/autofs/auto.bender --browse

View File

@ -0,0 +1,7 @@
#
3D -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/3D
Documents -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/documents
Photos -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/photos
Software -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/software
logn bender.lan:/mnt/MAIN/logn

View File

@ -0,0 +1,16 @@
- name: copy bender.autofs
become: yes
copy:
src: etc/auto.master.d/bender.autofs
dest: /etc/auto.master.d/bender.autofs
- name: create autofs directory
file:
path: /etc/autofs
state: directory
- name: copy auto.bender
become: yes
copy:
src: etc/autofs/auto.bender
dest: /etc/autofs/auto.bender

View File

@ -0,0 +1,8 @@
- name: install necessary software
become: yes
apt:
update_cache: yes
pkg:
- autofs
- cifs-utils
- nfs-common

View File

@ -0,0 +1,3 @@
- import_tasks: install.yml
- import_tasks: configure.yml

View File

@ -13,6 +13,7 @@
name: chromium
state: absent
when:
- "'snapd' in ansible_facts.packages"
- "'chromium-browser' in ansible_facts.packages"
- ansible_facts.packages['chromium-browser'][0].version == "1:85.0.4183.83-0ubuntu2.22.04.1"

View File

@ -1,7 +1,4 @@
---
- import_tasks: upstream.yml
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int < 22
- import_tasks: ppa.yml
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 22

View File

@ -9,6 +9,7 @@
name: firefox
state: absent
when:
- "'snapd' in ansible_facts.packages"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
@ -17,6 +18,7 @@
name: firefox
state: disabled
when:
- "'snapd' in ansible_facts.packages"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"

View File

@ -1,12 +0,0 @@
- name: remove snap
become: yes
community.general.snap:
name: firefox
state: absent
- name: install browser
become: yes
apt:
update_cache: yes
pkg:
- firefox