linux-mint/mint.yml
2023-08-10 13:51:00 +02:00

208 lines
6.1 KiB
YAML

---
- name: Mint Packages
hosts: all
tasks:
- name: Install Basic Packages
apt:
name:
# powersave
- tlp
- tlp-rdw
# Speed up program start
- preload
# mediacodecs and fonts
- mint-meta-codecs
- ubuntu-restricted-extras
- libavcodec-extra
- libdvd-pkg
- fonts-terminus
# share desk
- x11vnc
# useful other stuff
- spectre-meltdown-checker
- pwgen
- arj
- p7zip
- unace
- unadf
- bvi
- fdupes
- radeontop
- debootstrap
- geoip-bin
- sshfs
- speedtest-cli
# tools for android-smartphones/LineageOS
- heimdall-flash
- android-tools-adb
- android-tools-fastboot
- android-tools-mkbootimg
# OnlineBanking
- hibiscus
# dconf-gui
- dconf-editor
# Media
- vlc
- gthumb
- mediainfo-gui
- easytag
- audacity
- asunder
- mediathekview
- audacious
- guvcview
# retro
- dosbox
# brennen
- brasero
# misc
- openoffice.org-hyphenation
- gpodder
- wireguard
- wireguard-tools
- tinyproxy
update_cache: yes
install_recommends: no
- name: Install Flatpaks
community.general.flatpak:
name:
- org.gtk.Gtk3theme.Mint-Y-Dark
- org.signal.Signal
- com.nextcloud
- com.vscodium.codium
- com.github.wwmm.pulseeffects
- org.ksnip.ksnip
- org.gnome.Evolution
- com.github.tchx84.Flatseal
- tv.kodi.Kodi
state: present
method: system
- name: mint-config-update
blockinfile:
path: /etc/systemd/system/mint-config-update.service
create: yes
mode: 0444
owner: root
group: root
marker: "# {mark} ANSIBLE MANAGED BLOCK"
block: |
[Unit]
Description=Mint Upgrade Service
#After=multi-user.target network.target network-online.target nss-lookup.target docker.service sshd.service tor.service
Requires=multi-user.target network.target network-online.target nss-lookup.target docker.service systemd-resolved.service sshd.service tor.service
[Service]
Type=simple
User=root
RemainAfterExit=true
ExecStart=bash -x /usr/local/sbin/mint-config-update.sh
ExecStop=bash -c "until ! test -e /run/mint-config-update.sh.lock; do sleep 2; done"
KillSignal=SIGCONT
TimeoutStopSec=1800
StandardOutput=append:/var/log/mint-config-update.sh.log
StandardError=append:/var/log/mint-config-update.sh.log
[Install]
WantedBy=multi-user.target
- name: 'add mint-config-update to startup'
command: systemctl enable mint-config-update.service
args:
creates: /etc/systemd/system/multi-user.target.wants/mint-config-update.service
- name: remove dhcpcd because NetworkManager is doing the job
command: systemctl disable dhcpcd
args:
removes: /etc/systemd/system/multi-user.target.wants/dhcpcd.service
- name: /etc/default/grub nonquiet nosplash
ansible.builtin.lineinfile:
path: /etc/default/grub
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT=.*$'
line: "GRUB_CMDLINE_LINUX_DEFAULT=\"nosplash\""
backup: yes
notify:
- update-grub
- name: enable Mint Autoupdate
command: systemctl enable mintupdate-automation-upgrade.timer
args:
creates: /etc/systemd/system/timers.target.wants/mintupdate-automation-upgrade.timer
- name: enable Mint Autoupdate Cleanup
command: systemctl enable mintupdate-automation-autoremove.timer
args:
creates: /etc/systemd/system/timers.target.wants/mintupdate-automation-autoremove.timer
- name: mint-config-update
ansible.builtin.get_url:
url: https://gitea.ds9.dedyn.io/olli/linux-mint/raw/branch/main/mint-config-update.sh
dest: /usr/local/sbin/mint-config-update.sh
mode: '0555'
owner: root
group: root
force: yes
backup: yes
- name: mint-config-update startmenu
ansible.builtin.get_url:
url: https://gitea.ds9.dedyn.io/olli/linux-mint/raw/branch/main/mint-config-update.desktop
dest: /usr/share/applications/mint-config-update.desktop
mode: '0444'
owner: root
group: root
force: yes
- name: gtc-media-compress
ansible.builtin.get_url:
url: https://gitea.ds9.dedyn.io/olli/gtc-media-compress/raw/branch/main/gtc-media-compress.sh
dest: /usr/local/bin/gtc-media-compress.sh
mode: '0555'
owner: root
group: root
force: yes
backup: yes
- name: gtc-media-compress startmenu
ansible.builtin.get_url:
url: https://gitea.ds9.dedyn.io/olli/gtc-media-compress/raw/branch/main/gtc-media-compress.desktop
dest: /usr/share/applications/gtc-media-compress.desktop
mode: '0444'
owner: root
group: root
force: yes
- name: Allow Mint warpinator in firewall to tcp port 42000
community.general.ufw:
rule: allow
port: '42000'
proto: tcp
- name: Allow Mint warpinator in firewall to udp port 42000
community.general.ufw:
rule: allow
port: '42000'
proto: udp
- name: force samplerate to 44100 to avoid problems with additional audio hardware for live streams
blockinfile:
path: /etc/pulse/daemon.conf
owner: root
group: root
create: no
marker: "; {mark} ANSIBLE MANAGED BLOCK"
block: |
default-sample-rate = 44100
alternate-sample-rate = 44100
backup: yes
handlers:
- name: update-grub
ansible.builtin.shell: update-grub