Compare commits

...

2 Commits

Author SHA1 Message Date
65c9192563 klal
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2025-10-21 20:05:08 +02:00
f59fb2bd8b lala 2025-10-21 20:02:34 +02:00
2 changed files with 55 additions and 12 deletions

View File

@@ -46,7 +46,22 @@
mode: '0600'
owner: root
group: root
- name: Creating a file with content
ansible.builtin.copy:
dest: "/etc/auto.nas-music"
content: |
music --fstype=nfs,rw nas.home.lan:/music
mode: '0600'
owner: root
group: root
- name: Creating a file with content
ansible.builtin.copy:
dest: "/etc/auto.nas-shows"
content: |
shows --fstype=nfs,rw nas.home.lan:/shows
mode: '0600'
owner: root
group: root
# - name: Creating a file with content
# ansible.builtin.copy:
# dest: "/etc/auto.nas-music"
@@ -93,9 +108,12 @@
ansible.builtin.copy:
dest: "/etc/auto.nas"
content: |
nas-docker-data --fstype=nfs,rw nas.home.lan:/docker_data
nas-data --fstype=nfs,rw nas.home.lan:/Data
qda_1 --fstype=nfs,rw nas.home.lan:/qda_1
nas-qda_1 --fstype=nfs,rw nas.home.lan:/qda_1
nas-photo --fstype=nfs,rw nas.home.lan:/Photo
nas-install --fstype=nfs,rw nas.home.lan:/install
nas-games --fstype=nfs,rw nas.home.lan:/games
mode: '0600'
owner: root
group: root
@@ -106,21 +124,22 @@
# insertafter: '^/media/nas'
# line: "/media/nas /etc/auto.nas --timeout 360 --ghost"
# - name: Reconfigure autofs Server
# ansible.builtin.lineinfile:
# path: /etc/auto.master
# regexp: "^/media/data/music/nas.*"
# line: /media/data/music/nas /etc/auto.nas-music --timeout 360 --ghost
- name: Reconfigure autofs Server
ansible.builtin.lineinfile:
path: /etc/auto.master
regexp: "^/media/data/music/nas.*"
line: /media/data/music/nas /etc/auto.nas-music --timeout 360 --ghost
- name: Reconfigure autofs Server
ansible.builtin.lineinfile:
path: /etc/auto.master
regexp: "^/media/data/movies/nas.*"
line: /media/data/movies/nas /etc/auto.nas-movies --timeout 360 --ghost
# - name: Reconfigure autofs Server
# ansible.builtin.lineinfile:
# path: /etc/auto.master
# regexp: "^/media/data/shows/nas.*"
# line: /media/data/shows/nas /etc/auto.nas-shows --timeout 360 --ghost
- name: Reconfigure autofs Server
ansible.builtin.lineinfile:
path: /etc/auto.master
regexp: "^/media/data/shows/nas.*"
line: /media/data/shows/nas /etc/auto.nas-shows --timeout 360 --ghost
- name: Reconfigure autofs Server

View File

@@ -0,0 +1,24 @@
#!/bin/bash
rm /tmp/monitors.txt
while read -r output hex conn; do
[[ -z "$conn" ]] && conn=${output%%-*}
echo "$output;$(xxd -r -p <<< "$hex")">>/tmp/monitors.txt
done < <(xrandr --prop | awk '
!/^[ \t]/ {
if (output && hex) print output, hex, conn
output=$1
hex=""
}
/ConnectorType:/ {conn=$2}
/[:.]/ && h {
sub(/.*000000fc00/, "", hex)
hex = substr(hex, 0, 26) "0a"
sub(/0a.*/, "", hex)
h=0
}
h {sub(/[ \t]+/, ""); hex = hex $0}
/EDID.*:/ {h=1}
END {if (output && hex) print output, hex, conn}
' | sort
)