175 lines
4.3 KiB
YAML
175 lines
4.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: Install packages
|
|
ansible.builtin.package:
|
|
pkg:
|
|
- zsh
|
|
- pass
|
|
- vifm
|
|
- cmus
|
|
- unzip
|
|
state: present
|
|
become: true
|
|
|
|
- name: Clone my zsh repository
|
|
ansible.builtin.git:
|
|
repo: ssh://git@git.epha.se:24422/ephase/zsh_config.git
|
|
dest: '{{ ansible_user_dir }}/.config/zsh'
|
|
|
|
- name: Symlink .zshenv to ~
|
|
ansible.builtin.file:
|
|
src: '{{ ansible_user_dir }}/.config/zsh/.zshenv'
|
|
dest: '{{ ansible_user_dir }}/.zshenv'
|
|
state: link
|
|
|
|
- name: Clone my neovim repository
|
|
ansible.builtin.git:
|
|
repo: ssh://git@git.epha.se:24422/ephase/nvim_config.git
|
|
dest: '{{ ansible_user_dir }}/.config/nvim'
|
|
|
|
- name: Launch Sway related roles
|
|
hosts: all
|
|
roles:
|
|
- ansible-sshagentd
|
|
- ansible-sway
|
|
- ansible-kanshi
|
|
- ansible-mako
|
|
- ansible-swaylock
|
|
- ansible-swayidle
|
|
- ansible-waybar
|
|
|
|
- name: Configure desktop
|
|
hosts: all
|
|
tasks:
|
|
- name: Install packages on Arch
|
|
ansible.builtin.package:
|
|
pkg:
|
|
- arc-solid-gtk-theme
|
|
- glib2
|
|
- pinentry
|
|
- gcr
|
|
- libnotify
|
|
- opensc
|
|
- qt5-wayland
|
|
- ttf-dejavu
|
|
- ttf-fira-code
|
|
- ttf-joypixels
|
|
- ttf-liberation
|
|
- ttf-linux-libertine
|
|
- xorg-xwayland
|
|
when: ansible_distribution == "Archlinux"
|
|
become: true
|
|
|
|
- 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
|
|
- qtwayland5
|
|
- scdaemon
|
|
- texlive
|
|
- webext-browserpass
|
|
- xwayland
|
|
when: ansible_distribution == "Debian"
|
|
become: true
|
|
|
|
- name: Install others packages
|
|
ansible.builtin.package:
|
|
pkg:
|
|
- papirus-icon-theme
|
|
- brightnessctl
|
|
- chafa
|
|
- firefox
|
|
- foot
|
|
- foot-terminfo
|
|
- fzf
|
|
- highlight
|
|
- hugo
|
|
- imv
|
|
- khal
|
|
- khard
|
|
- npm
|
|
- mpv
|
|
- ntfs-3g
|
|
- pipewire
|
|
- pipewire-pulse
|
|
- qutebrowser
|
|
- rsync
|
|
- sshfs
|
|
- udisks2
|
|
- vdirsyncer
|
|
- 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
|