Refactor desktop role

This commit is contained in:
Przemek Grondek 2024-05-11 12:55:24 +02:00
parent 5a1da61f31
commit 4c59b1592a
13 changed files with 111 additions and 61 deletions

View File

@ -1,41 +1,25 @@
---
- name: install basic system
- name: "[Arch] install basic system"
become: yes
community.general.pacman:
name:
- btrfs-progs
- cronie
- dhcpcd
- efibootmgr
- grub
- xorg-xinit
- polkit-gnome
- xdg-desktop-portal-gtk
- helvum
- name: "Enable cron service"
become: yes
ansible.builtin.systemd:
name: cronie
state: started
enabled: yes
- name: install terminal packages [Arch]
- name: "[Arch] install terminal packages"
become: yes
community.general.pacman:
name:
- autorandr
- bash-completion
- bind
- bluez
- brightnessctl
- graphviz
- htop
- imagemagick
- less
- net-tools
- neofetch
- networkmanager
- screen
- tmux
- traceroute
@ -44,9 +28,9 @@
- name: "[Arch] install terminal packages"
shell:
cmd:
yay -S --needed --noconfirm epson-inkjet-printer-escpr pm-utils
yay -S --needed --noconfirm pm-utils
- name: install gui packages
- name: "[Arch] install gui packages"
become: yes
community.general.pacman:
name:
@ -58,44 +42,11 @@
- gnome-themes-extra
- gsimplecal
- libreoffice-still
- network-manager-applet
- nm-connection-editor
- nautilus
- numlockx
- openscad
- pavucontrol
- pasystray
- picom
- redshift
- thunderbird
- xdotool
- xorg-xkill
- xorg-xwininfo
- name: Install some fonts
become: yes
community.general.pacman:
name:
- ttf-dejavu
- ttf-fira-code
- ttf-font-awesome
- ttf-liberation
- ttf-ubuntu-font-family
- name: "Enable network manager"
become: yes
ansible.builtin.systemd:
name: NetworkManager.service
state: started
enabled: yes
- name: install flatpak
become: yes
community.general.pacman:
name:
- flatpak
- name: copy scripts
- name: "[Arch] copy scripts"
become: yes
copy:
src: "usr/local/sbin/{{item}}"

View File

@ -3,6 +3,8 @@
become: yes
community.general.pacman:
name:
- pavucontrol
- pasystray
- pipewire
- pipewire-alsa
- pipewire-pulse

View File

@ -4,6 +4,7 @@
community.general.pacman:
name:
- blueman
- bluez
- name: "[All] Enable service"
become: yes

View File

@ -0,0 +1,14 @@
- name: "[Arch] Install cron"
become: yes
community.general.pacman:
name:
- cronie
when: ansible_distribution == "Archlinux"
- name: "[Arch] Enable cron service"
become: yes
ansible.builtin.systemd:
name: cronie
state: started
enabled: yes
when: ansible_distribution == "Archlinux"

View File

@ -0,0 +1,19 @@
- name: "[Arch] cups"
become: yes
community.general.pacman:
name:
- cups
when: ansible_distribution == "Archlinux"
- name: "[Arch] install drivers for epson printer"
shell:
cmd:
yay -S --needed --noconfirm epson-inkjet-printer-escpr
when: ansible_distribution == "Archlinux"
- name: "[All] Enable service"
become: yes
ansible.builtin.systemd:
name: cups
state: started
enabled: yes

View File

@ -1,4 +1,3 @@
---
- name: checkout dotfiles
git:
repo: "{{ git.dotfiles }}"

View File

@ -1,3 +1,18 @@
- name: "[Arch] install flatpak"
become: yes
community.general.pacman:
name:
- flatpak
when: ansible_distribution == "Archlinux"
- name: "[Ubuntu] install package managers"
become: yes
apt:
update_cache: yes
pkg:
- flatpak
when: ansible_distribution == "Ubuntu"
- name: "[All] install the smile emoji picker"
community.general.flatpak:
state: present

View File

@ -0,0 +1,10 @@
- name: "[Arch] Install fonts"
become: yes
community.general.pacman:
name:
- ttf-dejavu
- ttf-fira-code
- ttf-font-awesome
- ttf-liberation
- ttf-ubuntu-font-family
when: ansible_distribution == "Archlinux"

View File

@ -11,8 +11,18 @@
- import_tasks: bluetooth.yml
- import_tasks: cron.yml
- import_tasks: cups.yml
- import_tasks: dotfiles.yml
- import_tasks: fonts.yml
- import_tasks: network-manager.yml
- import_tasks: signal.yml
- import_tasks: timekpr.yml
- import_tasks: xorg.yml

View File

@ -0,0 +1,15 @@
- name: "[Arch] install nm packages"
become: yes
community.general.pacman:
name:
- networkmanager
- network-manager-applet
- nm-connection-editor
when: ansible_distribution == "Archlinux"
- name: "[All] Enable network manager"
become: yes
ansible.builtin.systemd:
name: NetworkManager.service
state: started
enabled: yes

View File

@ -2,24 +2,24 @@
- become: yes
when: ansible_distribution == "Ubuntu"
block:
- name: add signal gpg key [Ubuntu[
- name: "[Ubuntu] add signal gpg key"
apt_key:
url: https://updates.signal.org/desktop/apt/keys.asc
state: present
- name: add signal repo
- name: "[Ubuntu] add signal repo"
apt_repository:
repo: deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main
state: present
filename: signal-xenial
- name: install signal-desktop
- name: "[Ubuntu] install signal-desktop"
apt:
update_cache: yes
pkg:
- signal-desktop
- name: install signal-desktop [Arch]
- name: "[Arch] install signal-desktop"
when: ansible_distribution == "Archlinux"
become: yes
community.general.pacman:

View File

@ -1,10 +1,9 @@
- name: "[Ubuntu] install package managers"
- name: "[Ubuntu] install aptitude"
become: yes
apt:
update_cache: yes
pkg:
- aptitude
- flatpak
- name: "[Ubuntu] install terminal packages"
become: yes

View File

@ -0,0 +1,15 @@
- name: "[Arch] install xorg tools"
become: yes
community.general.pacman:
name:
- autorandr
- brightnessctl
- numlockx
- picom
- polkit-gnome
- redshift
- xdotool
- xdg-desktop-portal-gtk
- xorg-xinit
- xorg-xkill
- xorg-xwininfo