Include more in playbook

This commit is contained in:
exu 2024-10-07 16:39:07 +02:00
parent 9d3683268a
commit 9170e889e1
4 changed files with 211 additions and 170 deletions

View File

@ -227,12 +227,11 @@ cat <<EOF
########################################
EOF
# TODO continue here
# reload systemd user scripts
systemctl --user daemon-reload
# set systemd services for vmware (only if installed)
# TODO
if [[ $(pacman -Q | grep vmware-workstation) ]]; then
sudo systemctl enable --now vmware-networks.service || echo "Service failed, continuing"
sudo systemctl enable --now vmware-usbarbitrator.service || echo "Service failed, continuing"
@ -248,6 +247,7 @@ fi
sudo systemctl enable fstrim.timer
# enable btrfs maintenance timers
# TODO
if [[ $(pacman -Q | grep btrfsmaintenance) ]]; then
sudo systemctl restart btrfsmaintenance-refresh.service
sudo systemctl enable btrfs-balance.timer
@ -261,6 +261,7 @@ sudo timedatectl set-ntp true
systemctl --user enable --now ssh-agent
# enable reflector timer
# TODO
if [[ $(pacman -Q | grep reflector) ]]; then
sudo systemctl enable reflector.timer
fi
@ -276,12 +277,15 @@ cat <<EOF
EOF
# set systemd and group for vmware (only if installed)
# TODO
if [[ $(pacman -Q | grep vmware-workstation) ]]; then
echo "Setting up group for vmware"
sudo groupadd -f vmware
sudo gpasswd -a "$USER" vmware 1>/dev/null
fi
# TODO continue here
# set group for libvirt
if [[ $(pacman -Q | grep libvirt) ]]; then
echo "Setting group for libvirt"

View File

@ -10,9 +10,16 @@
- ".gtkrc-2.0"
- ".local"
- ".ssh"
- "etc"
- "scripts"
- name: Copy new files and directories (root)
ansible.builtin.copy:
src: "files/{{ item }}"
dest: "~/{{ item }}"
loop:
- "etc"
become: true
- name: Symlink xdg environment variables
ansible.builtin.file:
src: "~/.config/user-dirs.dirs"
@ -29,3 +36,31 @@
src: "/tmp/bash-cat-with-cat/cat.sh"
dest: "~/scripts/pieces/cat.sh"
mode: "0755"
- name: Reload user systemd services
ansible.builtin.systemd_service:
daemon_reload: true
- name: Enable fstrim
ansible.builtin.systemd_service:
name: fstrim.timer
state: "started"
enabled: true
become: true
- name: Enable NTP
ansible.builtin.command: timedatectl set-ntp true
become: true
- name: Enable ssh-agent
ansible.builtin.systemd_service:
name: ssh-agent
state: "restarted"
enabled: true
- name: Enable vnstat
ansible.builtin.systemd_service:
name: vnstat
state: "started"
enabled: true
become: true

View File

@ -1,7 +1,9 @@
---
- name: Update packages
community.general.pacman:
update_cache: true
upgrade: true
become: true
- name: Install official packages
community.general.pacman:
@ -165,7 +167,8 @@
- xdg-utils # standards
- xfsprogs # xfs
- yt-dlp
# AUR packages
# - dockerfile-language-server # code
# - dockfmt
# - refind-theme-nord # bootmenu
# - dockerfile-language-server # code # AUR
# - dockfmt # AUR
# - refind-theme-nord # bootmenu # AUR
# - btrfsmaintenance # AUR
become: true

View File

@ -1,6 +1,5 @@
---
- hosts: localhost
become: yes
roles:
# install packages
- role: packages