To hell with this crap
This commit is contained in:
parent
439729486c
commit
04145f21e0
@ -1,247 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
gather_facts: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: Configure /etc/apt/sources.list
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
path: /etc/apt/sources.list
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
block: |
|
|
||||||
deb http://debian.uchicago.edu/debian/ {{ansible_distribution_release}} main contrib non-free non-free-firmware
|
|
||||||
deb http://debian.uchicago.edu/debian/ {{ansible_distribution_release}}-updates main contrib non-free non-free-firmware
|
|
||||||
deb http://debian.uchicago.edu/debian/ {{ansible_distribution_release}}-backports main contrib non-free non-free-firmware
|
|
||||||
deb http://security.debian.org/debian-security {{ansible_distribution_release}}-security main contrib non-free non-free-firmware
|
|
||||||
|
|
||||||
- name: Disable APT language translations
|
|
||||||
ansible.builtin.lineinfile:
|
|
||||||
path: /etc/apt/apt.conf.d/99translations
|
|
||||||
line: 'Acquire::Languages "none";'
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
create: true
|
|
||||||
|
|
||||||
- name: Update APT repository cache
|
|
||||||
ansible.builtin.apt:
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Run dist-upgrade if needed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
upgrade: dist
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Add third-party repositories
|
|
||||||
block:
|
|
||||||
- name: Ensure /usr/share/keyrings exists
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /usr/share/keyrings
|
|
||||||
state: directory
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Add Tailscale repo key
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "https://pkgs.tailscale.com/stable/debian/{{ansible_distribution_release}}.noarmor.gpg"
|
|
||||||
dest: /usr/share/keyrings/tailscale-archive-keyring.gpg
|
|
||||||
|
|
||||||
- name: Add Tailscale repo
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list
|
|
||||||
dest: /etc/apt/sources.list.d/tailscale.list
|
|
||||||
|
|
||||||
- name: Install APT packages
|
|
||||||
ansible.builtin.apt:
|
|
||||||
update_cache: true
|
|
||||||
default_release: "{{ansible_distribution_release}}-backports"
|
|
||||||
state: present
|
|
||||||
pkg:
|
|
||||||
- apt-file
|
|
||||||
- apt-listbugs
|
|
||||||
- apt-listchanges
|
|
||||||
- apt-transport-https
|
|
||||||
- atop
|
|
||||||
- autoconf
|
|
||||||
- automake
|
|
||||||
- autossh
|
|
||||||
- borgbackup
|
|
||||||
- borgmatic
|
|
||||||
- breeze-gtk-theme
|
|
||||||
- breeze-icon-theme
|
|
||||||
- btop
|
|
||||||
- build-essential
|
|
||||||
- curl
|
|
||||||
- dnsutils
|
|
||||||
- emacs
|
|
||||||
- firewalld
|
|
||||||
- flatpak
|
|
||||||
- fonts-noto-color-emoji
|
|
||||||
- fonts-noto-mono
|
|
||||||
- git
|
|
||||||
- git-core
|
|
||||||
- golang
|
|
||||||
- htop
|
|
||||||
- hugo
|
|
||||||
- jc
|
|
||||||
- jq
|
|
||||||
- lynx
|
|
||||||
- ncat
|
|
||||||
- ndiff
|
|
||||||
- nextcloud-desktop
|
|
||||||
- nodejs
|
|
||||||
- npm
|
|
||||||
- optipng
|
|
||||||
- papirus-icon-theme
|
|
||||||
- pass
|
|
||||||
- pipx
|
|
||||||
- podman
|
|
||||||
- python3-dev
|
|
||||||
- python3-pip
|
|
||||||
- rsync
|
|
||||||
- systemd-resolved
|
|
||||||
- tailscale
|
|
||||||
- tuptime
|
|
||||||
- w3m
|
|
||||||
- w3m-img
|
|
||||||
- wget
|
|
||||||
- wireshark
|
|
||||||
- zip
|
|
||||||
- zsh
|
|
||||||
|
|
||||||
- name: Configure XDG user dirs defaults
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
path: /etc/xdg/user-dirs.defaults
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
block: |
|
|
||||||
DESKTOP=desktop
|
|
||||||
DOWNLOAD=downloads
|
|
||||||
TEMPLATES=
|
|
||||||
PUBLICSHARE=sync
|
|
||||||
DOCUMENTS=sync/documents
|
|
||||||
MUSIC=
|
|
||||||
PICTURES=sync/pictures
|
|
||||||
VIDEOS=sync/videos
|
|
||||||
|
|
||||||
- name: Remove old ~/.config/user-dirs.dirs
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /home/jas/.config/user-dirs.dirs
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove unneeded XDG user dirs
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/home/jas/{{ item }}"
|
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- Desktop
|
|
||||||
- Documents
|
|
||||||
- Downloads
|
|
||||||
- Music
|
|
||||||
- Pictures
|
|
||||||
- Public
|
|
||||||
- Templates
|
|
||||||
- Videos
|
|
||||||
|
|
||||||
- name: Run xdg-user-dirs-update
|
|
||||||
ansible.builtin.command: xdg-user-dirs-update
|
|
||||||
become_user: jas
|
|
||||||
|
|
||||||
- name: Reconfigure fontconfig-config - hinting_type
|
|
||||||
ansible.builtin.debconf:
|
|
||||||
name: fontconfig-config
|
|
||||||
question: fontconfig/hinting_type
|
|
||||||
value: Autohinter
|
|
||||||
vtype: select
|
|
||||||
|
|
||||||
- name: Reconfigure fontconfig-config - enable_bitmaps
|
|
||||||
ansible.builtin.debconf:
|
|
||||||
name: fontconfig-config
|
|
||||||
question: fontconfig/enable_bitmaps
|
|
||||||
value: false
|
|
||||||
vtype: boolean
|
|
||||||
|
|
||||||
- name: Reconfigure fontconfig-config - hinting_style
|
|
||||||
ansible.builtin.debconf:
|
|
||||||
name: fontconfig-config
|
|
||||||
question: fontconfig/hinting_style
|
|
||||||
value: hintslight
|
|
||||||
vtype: select
|
|
||||||
|
|
||||||
- name: Reconfigure fontconfig-config - subpixel_rendering
|
|
||||||
ansible.builtin.debconf:
|
|
||||||
name: fontconfig-config
|
|
||||||
question: fontconfig/subpixel_rendering
|
|
||||||
value: Always
|
|
||||||
vtype: select
|
|
||||||
|
|
||||||
- name: Configure systemd-networkd (desktop)
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
path: /etc/systemd/network/eno1.network
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
block: |
|
|
||||||
[Match]
|
|
||||||
Name=eno1
|
|
||||||
|
|
||||||
[Network]
|
|
||||||
Address=10.0.0.2/24
|
|
||||||
Gateway=10.0.0.1
|
|
||||||
Broadcast=10.0.0.255
|
|
||||||
DNS=9.9.9.9
|
|
||||||
#DNS=100.100.100.100
|
|
||||||
DNSSEC=true
|
|
||||||
when:
|
|
||||||
- ansible_hostname == "desktop"
|
|
||||||
|
|
||||||
- name: Enable systemd-networkd on startup (desktop)
|
|
||||||
ansible.builtin.systemd_service:
|
|
||||||
name: systemd-networkd.service
|
|
||||||
enabled: true
|
|
||||||
when:
|
|
||||||
- ansible_hostname == "desktop"
|
|
||||||
|
|
||||||
- name: Disable NetworkManager and networking.service (desktop)
|
|
||||||
ansible.builtin.systemd_service:
|
|
||||||
name: "{{ item }}"
|
|
||||||
enabled: false
|
|
||||||
with_items:
|
|
||||||
- NetworkManager.service
|
|
||||||
- networking.service
|
|
||||||
when:
|
|
||||||
- ansible_hostname == "desktop"
|
|
||||||
|
|
||||||
- name: Disable wpa_supplicant (desktop)
|
|
||||||
ansible.builtin.systemd_service:
|
|
||||||
name: wpa_supplicant.service
|
|
||||||
enabled: false
|
|
||||||
when:
|
|
||||||
- ansible_hostname == "desktop"
|
|
||||||
|
|
||||||
- name: Disable ipv6 in GRUB config
|
|
||||||
ansible.builtin.lineinfile:
|
|
||||||
path: /etc/default/grub
|
|
||||||
search_string: "GRUB_CMDLINE_LINUX_DEFAULT"
|
|
||||||
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet ipv6.disable=1"'
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
|
|
||||||
- name: Change jas user shell to zsh
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: jas
|
|
||||||
shell: /usr/bin/zsh
|
|
||||||
|
|
||||||
- name: Disable CUPS services
|
|
||||||
ansible.builtin.systemd_service:
|
|
||||||
name: "{{ item }}"
|
|
||||||
enabled: false
|
|
||||||
with_items:
|
|
||||||
- cups-browsed.service
|
|
||||||
- cups.service
|
|
||||||
|
|
||||||
- name: Disable avahi-daemon (desktop)
|
|
||||||
ansible.builtin.systemd_service:
|
|
||||||
name: avahi-daemon.service
|
|
||||||
enabled: false
|
|
Loading…
x
Reference in New Issue
Block a user