WakeOnLan, erste Versuche soundfix
This commit is contained in:
parent
cd7863c142
commit
ae71f87b98
12 changed files with 153 additions and 12 deletions
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Reboot machines
|
- name: Reboot machines
|
||||||
gather_facts: false
|
|
||||||
become: yes
|
become: yes
|
||||||
hosts: all
|
hosts: all
|
||||||
|
|
||||||
|
|
2
roles/lmn_qgm/files/81-wol.rules
Normal file
2
roles/lmn_qgm/files/81-wol.rules
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# enable wol
|
||||||
|
ACTION=="add", SUBSYSTEM=="net", NAME=="*", RUN+="/usr/sbin/ethtool -s $name wol g"
|
15
roles/lmn_qgm/files/qgm-soundfix.desktop
Normal file
15
roles/lmn_qgm/files/qgm-soundfix.desktop
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env xdg-open
|
||||||
|
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Exec=qgm-soundfix.sh
|
||||||
|
Name[de_DE]=QG - Ton zum Beamer
|
||||||
|
Name=QG - Ton zum Beamer
|
||||||
|
Icon=/usr/share/icons/breeze-dark/emblems/symbolic/emblem-music-symbolic.svg
|
||||||
|
Hidden=false
|
||||||
|
Comment=
|
||||||
|
Path=
|
||||||
|
StartupNotify=false
|
||||||
|
|
6
roles/lmn_qgm/files/qgm-soundfix.sh
Executable file
6
roles/lmn_qgm/files/qgm-soundfix.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CARD=$(pactl list cards short | head -n 1 | awk '{print $2}')
|
||||||
|
pactl set-card-profile $CARD output:hdmi-stereo+input:analog-stereo
|
||||||
|
HDMISINK=$(pactl list sinks short | grep hdmi | awk '{print $2}')
|
||||||
|
pactl set-default-sink $HDMISINK
|
|
@ -53,6 +53,7 @@
|
||||||
- libnotify-bin ## needed for pwroff script
|
- libnotify-bin ## needed for pwroff script
|
||||||
- neovim
|
- neovim
|
||||||
- net-tools
|
- net-tools
|
||||||
|
- ethtool
|
||||||
- netcat-openbsd
|
- netcat-openbsd
|
||||||
- nmap
|
- nmap
|
||||||
- tmux
|
- tmux
|
||||||
|
@ -250,3 +251,38 @@
|
||||||
path: /etc/firefox-esr/policies/firefox_policies.json
|
path: /etc/firefox-esr/policies/firefox_policies.json
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
##########
|
||||||
|
# Enable WOL
|
||||||
|
#
|
||||||
|
- name: Enable WOL
|
||||||
|
ansible.builtin.command: ethtool -s {{ ansible_default_ipv4.interface }} wol g
|
||||||
|
|
||||||
|
- name: Copy 81-wol.rules to target
|
||||||
|
copy:
|
||||||
|
src: 81-wol.rules
|
||||||
|
dest: /etc/udev/rules.d/81-wol.rules
|
||||||
|
mode: '0644'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
##########
|
||||||
|
# Laptop Skripte
|
||||||
|
#
|
||||||
|
- name: Copy qgm-soudfix.sh
|
||||||
|
copy:
|
||||||
|
src: qgm-soundfix.sh
|
||||||
|
dest: /usr/local/bin/qgm-soundfix.sh
|
||||||
|
mode: '0755'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: Copy qgm-soudfix.desktop
|
||||||
|
copy:
|
||||||
|
src: qgm-soundfix.desktop
|
||||||
|
dest: /usr/share/applications/qgm-soundfix.desktop
|
||||||
|
mode: '0644'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 775 KiB After Width: | Height: | Size: 187 KiB |
Binary file not shown.
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 206 KiB |
70
roles/qgm_vpdisplay/tasks/main.yml
Normal file
70
roles/qgm_vpdisplay/tasks/main.yml
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
vars_files:
|
||||||
|
- settings.vault
|
||||||
|
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- vim
|
||||||
|
- firefox-esr
|
||||||
|
- i3
|
||||||
|
- xorg
|
||||||
|
- git
|
||||||
|
- unclutter
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: "Install needed Packages"
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
"{{ packages }}"
|
||||||
|
|
||||||
|
- name: "change line in systemd config for autologin"
|
||||||
|
lineinfile:
|
||||||
|
path: "/etc/systemd/system/getty.target.wants/getty@tty1.service"
|
||||||
|
regexp: "ExecStart=-/sbin/agetty"
|
||||||
|
line: "ExecStart=-/sbin/agetty --noclear --autologin vp %I $TERM"
|
||||||
|
|
||||||
|
- name: "Copy .profile for startx"
|
||||||
|
copy:
|
||||||
|
src: "files/dot.profile"
|
||||||
|
dest: "/home/vp/.profile"
|
||||||
|
owner: vp
|
||||||
|
group: vp
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: "Create i3 config dir"
|
||||||
|
file:
|
||||||
|
path: "/home/vp/.config/i3"
|
||||||
|
state: directory
|
||||||
|
owner: vp
|
||||||
|
group: vp
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: "Copy i3 config"
|
||||||
|
copy:
|
||||||
|
src: "files/i3.config"
|
||||||
|
dest: "/home/vp/.config/i3/config"
|
||||||
|
owner: vp
|
||||||
|
group: vp
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: "Get vplan display repo"
|
||||||
|
git:
|
||||||
|
repo: "https://gitea.schule.social/QG-VP-Dev/VP-Screens-Management.git"
|
||||||
|
dest: /home/vp/vp
|
||||||
|
|
||||||
|
- name: "Configuration Template for Vplan"
|
||||||
|
template:
|
||||||
|
src: "templates/settings.js.j2"
|
||||||
|
dest: "/home/vp/vp/settings.js"
|
||||||
|
owner: vp
|
||||||
|
group: vp
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: "Change to teacher version if applicable"
|
||||||
|
when: "'lehrer' in group_names"
|
||||||
|
lineinfile:
|
||||||
|
path: "/home/vp/vp/settings.js"
|
||||||
|
regexp: "^const plantype"
|
||||||
|
line: "const plantype = \"lehrer\";"
|
||||||
|
|
||||||
|
- name: "Reboot"
|
||||||
|
ansible.builtin.reboot:
|
7
roles/qgm_vpdisplay/vars/main.yml
Normal file
7
roles/qgm_vpdisplay/vars/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
packages:
|
||||||
|
- vim
|
||||||
|
- firefox-esr
|
||||||
|
- i3
|
||||||
|
- xorg
|
||||||
|
- git
|
||||||
|
- unclutter
|
8
shutdown.yml
Normal file
8
shutdown.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- name: Shutdwon machines
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Unconditionally shut down the machine with all defaults
|
||||||
|
community.general.shutdown:
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
- name: Wake machines via WOL
|
|
||||||
gather_facts: false
|
|
||||||
hosts: all
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Wake machine
|
|
||||||
community.general.wakeonlan:
|
|
||||||
mac: "{{ mac }}"
|
|
||||||
delegate_to: localhost
|
|
9
wol.yml
Normal file
9
wol.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Wake machines via WOL
|
||||||
|
gather_facts: false
|
||||||
|
hosts: all
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Send magic Wake-On-Lan packet to turn on individual systems
|
||||||
|
command: wakeonlan {{ mac }}
|
||||||
|
delegate_to: localhost
|
Loading…
Add table
Add a link
Reference in a new issue