126 lines
2.7 KiB
YAML
126 lines
2.7 KiB
YAML
---
|
|
- name: Gather information
|
|
hosts: all
|
|
gather_facts: yes
|
|
tags: always
|
|
|
|
- name: Sanity checks
|
|
hosts: all
|
|
tags: always
|
|
tasks:
|
|
- name: Check theme name
|
|
fail:
|
|
msg: Variable 'theme' needs to be 'nord' or 'onedark'
|
|
when: theme != 'nord' and theme != 'onedark'
|
|
|
|
- name: Check clipboard manager name
|
|
fail:
|
|
msg: Variable 'clipboard' needs to be 'clipman' or 'cliphist'
|
|
when: clipboard != 'clipman' and clipboard != 'cliphist'
|
|
|
|
- name: Check notification daemon name
|
|
fail:
|
|
msg: Variable 'notification' needs to be 'dunst' or 'mako'
|
|
when: notification != 'dunst' and notification != 'mako'
|
|
|
|
- name: Check current user
|
|
fail:
|
|
msg: This playbook should not be run as 'root'
|
|
when: ansible_real_user_id == 0
|
|
|
|
- name: Guarantee that ~/.config and ~/.local/share exist
|
|
file:
|
|
path: '{{ item }}'
|
|
state: directory
|
|
loop:
|
|
- ~/.config
|
|
- ~/.local/share
|
|
|
|
- name: Deploy dotfiles
|
|
hosts: all
|
|
vars_files:
|
|
- 'palette/{{ theme }}.yml'
|
|
roles:
|
|
- role: scripts
|
|
tags: scripts
|
|
- role: alacritty
|
|
tags: alacritty
|
|
- role: amfora
|
|
tags: amfora
|
|
- role: anime-downloader
|
|
tags: anime-downloader
|
|
- role: bash
|
|
tags: bash
|
|
- role: bat
|
|
tags: bat
|
|
- role: cava
|
|
tags: [ never, cava ]
|
|
- role: dunst_mako
|
|
tags: notification
|
|
- role: element-desktop
|
|
tags: [ never, element-desktop ]
|
|
- role: emacs
|
|
tags: emacs
|
|
- role: fish
|
|
tags: fish
|
|
- role: fontconfig
|
|
tags: [ never, fontconfig ]
|
|
- role: foot
|
|
tags: foot
|
|
- role: gallery-dl
|
|
tags: gallery-dl
|
|
- role: git
|
|
tags: git
|
|
- role: glow
|
|
tags: glow
|
|
- role: gpg
|
|
tags: gpg
|
|
- role: mpd
|
|
tags: mpd
|
|
- role: mpv
|
|
tags: mpv
|
|
- role: newsboat
|
|
tags: newsboat
|
|
- role: npm
|
|
tags: npm
|
|
- role: nushell
|
|
tags: nushell
|
|
- role: nvim
|
|
tags: nvim
|
|
- role: qtcreator
|
|
tags: [ never, qtcreator ]
|
|
- role: qutebrowser
|
|
tags: qutebrowser
|
|
- role: ripgrep
|
|
tags: ripgrep
|
|
- role: river
|
|
tags: river
|
|
- role: starship
|
|
tags: starship
|
|
- role: sway
|
|
tags: sway
|
|
- role: swaylock
|
|
tags: swaylock
|
|
- role: tmux
|
|
tags: tmux
|
|
- role: translate-shell
|
|
tags: [ never, translate-shell ]
|
|
- role: vifm
|
|
tags: vifm
|
|
- role: xonsh
|
|
tags: [ never, xonsh ]
|
|
- role: waybar
|
|
tags: waybar
|
|
- role: weechat
|
|
tags: [ never, weechat ]
|
|
- role: wofi
|
|
tags: wofi
|
|
- role: xdg-desktop-portal-wlr
|
|
tags: xdg-desktop-portal-wlr
|
|
- role: yt-dlp
|
|
tags: yt-dlp
|
|
- role: zathura
|
|
tags: zathura
|
|
- role: zellij
|
|
tags: [ never, zellij ]
|