Many updates over time

This commit is contained in:
2026-02-24 17:57:35 -07:00
parent 6b36273324
commit 0132ed6a8f
68 changed files with 1409 additions and 197 deletions

14
file/autofs/README.md Normal file
View File

@@ -0,0 +1,14 @@
# Usage
In a playbook
```yml
# Configure autofs
- role: shared/roles/file/autofs
autofs_mounts:
- src: linvault1:/mnt/store/users/mreschke/Pictures
dest: /mnt/nas/users/mreschke/Pictures
- src: linvault1:/mnt/store/users/allison/Pictures
dest: /mnt/nas/users/allison/Pictures
```

View File

@@ -0,0 +1,5 @@
---
- name: reload-autofs
service:
name: autofs
state: reloaded

View File

@@ -0,0 +1,38 @@
---
# Install autofs
- name: Installing AutoFS on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
apt:
update_cache: yes
state: present
name:
- autofs
# Create extra.autofs
- name: Creating AutoFS /etc/auto.master.d/extra.autofs
template:
src: extra.autofs.j2
dest: /etc/auto.master.d/extra.autofs
owner: root
group: root
mode: '0644'
# Create the dest directories
- name: Creating AutoFS destination directories
file:
path: "{{ item.dest }}"
state: directory
owner: "{{ superuser }}"
group: "{{ supergroup }}"
mode: '0755'
loop: "{{ autofs_mounts }}"
# Create each servers /etc/auto.master.d/server.autofs file
- name: Creating AutoFS /etc/auto.master.d/server.autofs for each server in autofs_mounts
template:
src: mounts.autofs.j2
dest: /etc/auto.master.d/mounts.autofs
owner: root
group: root
mode: '0644'
notify: reload-autofs

View File

@@ -0,0 +1,5 @@
---
# Dynamically include proper file based on OS and Version
- name: "Configuring AutoFS on a {{ ansible_distribution }} {{ ansible_distribution_major_version }} System"
include_tasks: "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml"

View File

@@ -0,0 +1,5 @@
---
# OS Specific main.yml
- name: "Configuring AutoFS on a {{ ansible_distribution }} System"
include_tasks: "{{ ansible_distribution }}/main.yml"

View File

@@ -0,0 +1 @@
/- /etc/auto.master.d/mounts.autofs

View File

@@ -0,0 +1,4 @@
{% for mount in autofs_mounts %}
{{mount.dest}} -fstype=nfs,rw,soft,intr {{mount.src}}
{% endfor %}

View File

@@ -0,0 +1,7 @@
---
# Install Syncthing
- name: Installing Syncthing
apt:
update_cache: yes
state: present
name: syncthing