desktop-playbook/playbook.yml

118 lines
3 KiB
YAML

---
- name: Get host dependent variables
hosts: all
tasks:
- name: Load host relative variables
ansible.builtin.include_vars:
dir: 'vars/{{ ansible_hostname }}'
- name: Merge Sway output variable
ansible.builtin.set_fact:
sway_outputs: '{{ sway_outputs |
community.general.lists_mergeby(local_sway_outputs, "id") }}'
when: local_sway_outputs is defined
- name: Merge Sway input variable
ansible.builtin.set_fact:
sway_inputs: '{{ sway_inputs |
community.general.lists_mergeby( local_sway_inputs, "name" ) }}'
when: local_sway_inputs is defined
- name: Merge Kanshi profiles variable
ansible.builtin.set_fact:
kanshi_profiles: '{{ kanshi_profiles |
community.general.lists_mergeby(local_kanshi_profiles, "profile") }}'
when: local_kanshi_profiles is defined
- name: Install CLI stuff
hosts: all
tasks:
- name: Copy configuration files
ansible.builtin.copy:
src: config/
dest: '{{ ansible_user_dir }}/.config/'
mode: '0640'
directory_mode: '0750'
- name: Launch Sway related roles
hosts: all
roles:
- ansible-sshagentd
- ansible-sway
- ansible-kanshi
- ansible-mako
- ansible-swaylock
- ansible-swayidle
- ansible-waybar
- name: Install some stuff
hosts: all
tasks:
- name: Install packages on Debian
ansible.builtin.package:
pkg:
- arc-theme
- fonts-dejavu
- fonts-firacode
- fonts-liberation2
- fonts-linuxlibertine
- fonts-noto-color-emoji
- g++
- libglib2.0-bin
- lmodern
- libnotify-bin
- pandoc
- pinentry-gnome3
- pcscd
- pcsc-tools
- pulseaudio-utils
- scdaemon
- texlive
- webext-browserpass
- xwayland
when: ansible_distribution == "Debian"
become: true
- name: Install others packages
ansible.builtin.package:
pkg:
- papirus-icon-theme
- brightnessctl
- foot
- foot-terminfo
- fuzzel
- imv
- mpv
- ntfs-3g
- pipewire
- pipewire-pulse
- sshfs
- udisks2
- wireplumber
- xdg-desktop-portal-wlr
- xdg-user-dirs
become: true
- name: Copy executable files
ansible.builtin.copy:
src: bin/
dest: '{{ ansible_user_dir }}/.local/bin/'
mode: 0750
- block:
- name: Reload Systemd daemon
ansible.builtin.systemd:
scope: user
daemon-reload: true
- name: Activate Import Various service
ansible.builtin.systemd:
name: '{{ item }}'
scope: user
state: started
loop:
- import-gsettings.service
when: service_file is changed and not ansible_check_mode