mirror of
https://github.com/rodneyosodo/dotfiles.git
synced 2026-08-07 07:14:47 +00:00
feat(ansible): add install desktop packages task and yay&pacman config
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
.PHONY: ping
|
||||
ping:
|
||||
ansible-playbook playbooks/ping.yaml --connection=local
|
||||
|
||||
.PHONY: prep
|
||||
prep:
|
||||
ansible-galaxy collection install community.general
|
||||
ansible-galaxy collection install kewlfft.aur
|
||||
|
||||
.PHONY: install-desktop
|
||||
install-desktop: prep
|
||||
ansible-playbook playbooks/environment.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/yay.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/pacman.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/packages/desktop.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/amd.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/audio.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/docker.yaml --connection=local --ask-become-pass
|
||||
ansible-playbook playbooks/go.yaml --connection=local
|
||||
ansible-playbook playbooks/rust.yaml --connection=local
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
- name: Install AMD GPU Utilities
|
||||
hosts: 127.0.0.1
|
||||
tasks:
|
||||
- name: Install AMD GPU Utilities
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- amd-ucode
|
||||
- amdgpu_top-bin
|
||||
- mesa
|
||||
- xf86-video-amdgpu
|
||||
- vulkan-radeon
|
||||
- vulkan-icd-loader
|
||||
- libva-mesa-driver
|
||||
- mesa-vdpau
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Update GRUB
|
||||
become: yes
|
||||
become_user: root
|
||||
shell: grub-mkconfig -o /boot/grub/grub.cfg
|
||||
@@ -0,0 +1,33 @@
|
||||
- name: Setup Audio
|
||||
hosts: 127.0.0.1
|
||||
tasks:
|
||||
- name: Install Bluetooth Utilities
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- bluez
|
||||
- blueman
|
||||
- bluez-utils
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Add Bluetooth Module to Linux Kernel
|
||||
community.general.modprobe:
|
||||
name: btusb
|
||||
state: present
|
||||
|
||||
- name: Start Bluetooth Service
|
||||
ansible.builtin.systemd_service:
|
||||
name: bluetooth
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Install Audio Utilities
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- pulseaudio
|
||||
- pulseaudio-alsa
|
||||
- pulseaudio-bluetooth
|
||||
- pulseaudio-jack
|
||||
- pavucontrol
|
||||
use: yay
|
||||
state: present
|
||||
@@ -0,0 +1,31 @@
|
||||
- name: Docker Setup After Install
|
||||
hosts: 127.0.0.1
|
||||
vars:
|
||||
ansible_user: rodneyosodo
|
||||
tasks:
|
||||
- name: Install Docker if not already installed
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- docker
|
||||
- docker-buildx
|
||||
- docker-compose
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Start Docker
|
||||
ansible.builtin.systemd_service:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Add Current User to Docker Group
|
||||
ansible.builtin.shell:
|
||||
cmd: usermod -aG docker "{{ ansible_user }}"
|
||||
executable: /bin/bash
|
||||
become: yes
|
||||
|
||||
- name: Restart libvirtd
|
||||
ansible.builtin.systemd_service:
|
||||
name: libvirtd
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
@@ -0,0 +1,24 @@
|
||||
- name: Setup Environment
|
||||
hosts: 127.0.0.1
|
||||
become: yes
|
||||
become_user: root
|
||||
tasks:
|
||||
- name: Add Language to Environment
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/environment
|
||||
line: "LANG=en_GB.utf-8"
|
||||
state: present
|
||||
create: true
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Add Locale to Environment
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/environment
|
||||
line: "LC_ALL=en_GB.utf-8"
|
||||
state: present
|
||||
create: true
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
@@ -0,0 +1,25 @@
|
||||
- name: Rust Setup After Install
|
||||
hosts: 127.0.0.1
|
||||
tasks:
|
||||
- name: Install Golang if not already installed
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- go
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Install Golang Tools
|
||||
ansible.builtin.shell: |
|
||||
go install golang.org/x/tools/cmd/godoc@latest
|
||||
go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
go install github.com/google/pprof@latest
|
||||
go install golang.org/x/tools/gopls@latest
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
go install github.com/go-critic/go-critic/cmd/gocritic@latest
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install github.com/orlangure/gocovsh@latest
|
||||
go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
|
||||
go install go.uber.org/nilaway/cmd/nilaway@latest
|
||||
go install github.com/oligot/go-mod-upgrade@latest
|
||||
go install github.com/vektra/mockery/v2@latest
|
||||
@@ -0,0 +1,155 @@
|
||||
7zip
|
||||
act
|
||||
alacritty
|
||||
ansible
|
||||
arduino-cli
|
||||
arduino-ide
|
||||
asciinema
|
||||
beekeeper-studio-bin
|
||||
biome-bin
|
||||
brave-bin
|
||||
btop
|
||||
bun-bin
|
||||
ccache
|
||||
cloud-sql-proxy
|
||||
cloud-utils
|
||||
cmake
|
||||
commitizen-go
|
||||
ctop
|
||||
dbeaver
|
||||
discord
|
||||
dmidecode
|
||||
docker
|
||||
docker-buildx
|
||||
docker-compose
|
||||
easyeda-bin
|
||||
eslint
|
||||
esp-idf
|
||||
eza
|
||||
flameshot
|
||||
fzf
|
||||
ghostty
|
||||
gimp
|
||||
git
|
||||
git-delta
|
||||
git-lfs
|
||||
github-cli
|
||||
go
|
||||
google-chrome
|
||||
google-cloud-cli
|
||||
google-cloud-cli-gke-gcloud-auth-plugin
|
||||
graphviz
|
||||
grub-customizer
|
||||
guestfs-tools
|
||||
helm
|
||||
httpie
|
||||
hyperfine
|
||||
inkscape
|
||||
ipython
|
||||
jdk-openjdk
|
||||
jq
|
||||
just
|
||||
k6
|
||||
kconfig
|
||||
kompose
|
||||
kubectl
|
||||
lazydocker
|
||||
lazysql
|
||||
lens-bin
|
||||
libc++
|
||||
libguestfs
|
||||
libvirt
|
||||
libvirt-glib
|
||||
libvirt-python
|
||||
localsearch
|
||||
markdownlint-cli
|
||||
neofetch
|
||||
neovim
|
||||
ngrok
|
||||
ninja
|
||||
nodejs
|
||||
nodejs-npm-upgrade
|
||||
obs-studio
|
||||
obsidian
|
||||
openbsd-netcat
|
||||
openssl-1.1
|
||||
openvpn
|
||||
openvpn3
|
||||
pacman-contrib
|
||||
pandoc-cli
|
||||
platformio-core
|
||||
pnpm
|
||||
postman-bin
|
||||
pre-commit
|
||||
psutils
|
||||
putty
|
||||
pyenv
|
||||
pyenv-virtualenv
|
||||
python-pip
|
||||
python-psycopg2
|
||||
python36
|
||||
qbittorrent
|
||||
qemu-base
|
||||
qemu-desktop
|
||||
qemu-full
|
||||
quota-tools
|
||||
redisinsight-bin
|
||||
ruff
|
||||
rustup
|
||||
rye
|
||||
slack-desktop
|
||||
sshpass
|
||||
staticcheck
|
||||
stm32cubeide
|
||||
swtpm
|
||||
tailscale
|
||||
teams
|
||||
terraform
|
||||
thefuck
|
||||
tinygo
|
||||
tldr
|
||||
tmux
|
||||
tree
|
||||
ttf-hack-nerd
|
||||
ttf-meslo-nerd
|
||||
unrar
|
||||
upx
|
||||
uv
|
||||
virt-install
|
||||
virt-manager
|
||||
virt-viewer
|
||||
visual-studio-code-bin
|
||||
vlc
|
||||
w3m
|
||||
wabt
|
||||
wakatime
|
||||
wasmer
|
||||
yarn
|
||||
yay
|
||||
zed
|
||||
zellij
|
||||
zen-browser-bin
|
||||
zephyr
|
||||
zig
|
||||
zip
|
||||
zsh
|
||||
bat
|
||||
lsof
|
||||
downgrade
|
||||
make
|
||||
npm
|
||||
rsync
|
||||
vim
|
||||
p7zip
|
||||
tar
|
||||
curl
|
||||
wget
|
||||
preload
|
||||
kicad
|
||||
mosquitto-clients
|
||||
less
|
||||
syncthing
|
||||
k9s
|
||||
lazygit
|
||||
goreleaser
|
||||
golangci-lint
|
||||
@@ -0,0 +1,58 @@
|
||||
- name: Ping all hosts
|
||||
hosts: 127.0.0.1
|
||||
vars:
|
||||
package_file: "desktop.txt"
|
||||
tasks:
|
||||
- name: Read package list from file
|
||||
slurp:
|
||||
src: "{{ package_file }}"
|
||||
register: package_file_content
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Set package list variable
|
||||
set_fact:
|
||||
package_list: "{{ (package_file_content['content'] | b64decode).split('\n') | select('regex', '^[a-zA-Z0-9_-]+$') | list }}"
|
||||
|
||||
- name: Run the equivalent of "pacman -Sy" as a separate step
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
become: yes
|
||||
remote_user: root
|
||||
|
||||
- name: Run the equivalent of "pacman -Su" as a separate step
|
||||
community.general.pacman:
|
||||
upgrade: true
|
||||
become: yes
|
||||
remote_user: root
|
||||
|
||||
- name: Install packages using yay
|
||||
kewlfft.aur.aur:
|
||||
name: "{{ package_list }}"
|
||||
use: yay
|
||||
state: latest
|
||||
|
||||
- name: Remove unnecessary packages
|
||||
community.general.pacman:
|
||||
name:
|
||||
- gnome-connections
|
||||
- gnome-contacts
|
||||
- simple-scan
|
||||
- gnome-maps
|
||||
- gnome-tour
|
||||
state: absent
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Install Syncthing
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- syncthing
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Start Syncthing Service
|
||||
ansible.builtin.systemd_service:
|
||||
name: syncthing@rodneyosodo
|
||||
state: started
|
||||
enabled: true
|
||||
register: syncthing
|
||||
@@ -0,0 +1,52 @@
|
||||
- name: Setup Pacman
|
||||
hosts: 127.0.0.1
|
||||
become: yes
|
||||
become_user: root
|
||||
tasks:
|
||||
- name: Enable Colour in pacman.conf
|
||||
ansible.builtin.replace:
|
||||
path: /etc/pacman.conf
|
||||
regexp: "^#Color"
|
||||
replace: "Color"
|
||||
|
||||
- name: Enable Parallel Downloads in pacman.conf
|
||||
ansible.builtin.replace:
|
||||
path: /etc/pacman.conf
|
||||
regexp: '^(#\s*)?ParallelDownloads\s*=.*'
|
||||
replace: "ParallelDownloads = 5"
|
||||
|
||||
- name: Run the equivalent of "pacman -Sy" as a separate step
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
|
||||
- name: Run the equivalent of "pacman -Su" as a separate step
|
||||
community.general.pacman:
|
||||
upgrade: true
|
||||
|
||||
- name: Install Preload
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- preload
|
||||
use: yay
|
||||
state: latest
|
||||
become: no
|
||||
|
||||
- name: Start Preload
|
||||
ansible.builtin.systemd_service:
|
||||
name: preload
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Install pacman-contrib
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- pacman-contrib
|
||||
use: yay
|
||||
state: latest
|
||||
become: no
|
||||
|
||||
- name: Start paccache.timer
|
||||
ansible.builtin.systemd_service:
|
||||
name: paccache.timer
|
||||
state: started
|
||||
enabled: true
|
||||
@@ -0,0 +1,21 @@
|
||||
- name: Rust Setup After Install
|
||||
hosts: 127.0.0.1
|
||||
tasks:
|
||||
- name: Install Rustup if not already installed
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- rustup
|
||||
use: yay
|
||||
state: present
|
||||
|
||||
- name: Install Nightly Toolchain
|
||||
ansible.builtin.shell: |
|
||||
rustup update
|
||||
rustup target add wasm32-wasip1 wasm32-wasip2 wasm32-wasi wasm32-unknown-unknown
|
||||
rustup toolchain install nightly nightly-2018-12-27
|
||||
rustup component add clippy cargo rustfmt rust-std
|
||||
|
||||
- name: Install Cargo Tools
|
||||
ansible.builtin.shell:
|
||||
cmd: cargo install du-dust fd-find ripgrep cargo-generate jwt-cli wasm-pack git-cliff cargo-dist
|
||||
executable: /bin/bash
|
||||
@@ -0,0 +1,34 @@
|
||||
- name: Install yay
|
||||
hosts: 127.0.0.1
|
||||
vars:
|
||||
build_directory: "/tmp/yay-build"
|
||||
tasks:
|
||||
- name: Check if yay is installed
|
||||
command: yay --version
|
||||
register: yay_version
|
||||
ignore_errors: true
|
||||
|
||||
- name: Install prerequisites
|
||||
community.general.pacman:
|
||||
name:
|
||||
- git
|
||||
- base-devel
|
||||
state: present
|
||||
|
||||
- name: Clone yay repository
|
||||
git:
|
||||
repo: https://aur.archlinux.org/yay.git
|
||||
dest: "{{ build_directory }}"
|
||||
when: yay_version.rc != 0
|
||||
|
||||
- name: Build and install yay
|
||||
shell: cd "{{ build_directory }}" && makepkg -si --noconfirm
|
||||
when: yay_version.rc != 0
|
||||
args:
|
||||
creates: /usr/bin/yay
|
||||
|
||||
- name: Clean up build directory
|
||||
file:
|
||||
path: "{{ build_directory }}"
|
||||
state: absent
|
||||
when: ansible_check_mode == false
|
||||
Reference in New Issue
Block a user