playooks: group external playbooks into 1

Also:
- chromium: add Ozone flag for Wayland
- flatpak: add role
This commit is contained in:
Hoang Nguyen 2022-05-02 23:28:49 +07:00
parent e501f2dac2
commit 519a43411b
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
45 changed files with 497 additions and 400 deletions

View File

@ -17,6 +17,7 @@
tags: scripts
- role: ssh
tags: ssh
when: not dropbear_ssh_client
- role: aerc
tags: aerc
- role: amfora
@ -62,7 +63,8 @@
- role: qtcreator
tags: [ never, qtcreator ]
- role: qutebrowser
tags: [ never, qutebrowser ]
tags: qutebrowser
when: default_browser == 'qutebrowser'
- role: ripgrep
tags: ripgrep
- role: river

View File

@ -1,33 +0,0 @@
---
- name: Build an Alpine chroot
hosts: all
vars:
- chroot_dir: '{{ ansible_env.HOME }}/Alpine-chroot'
- repository: https://dl-cdn.alpinelinux.org/alpine
tasks:
- block:
- name: Ensure the chroot directory exists
file:
path: '{{ chroot_dir }}'
state: directory
mode: 0755
- name: Create the chroot
command:
cmd: 'apk -X {{ repository }}/edge/main -U --allow-untrusted -p {{ chroot_dir }} --initdb add alpine-base'
creates: '{{ chroot_dir }}/bin/busybox'
- name: Update the repository urls
template:
src: ./templates/repositories.j2
dest: '{{ chroot_dir }}/etc/apk/repositories'
owner: root
group: root
mode: 0644
become: yes
- name: Install a stupid script for chrooting
template:
src: ./templates/alpine-chroot.j2
dest: ~/.local/bin/alpine-chroot
mode: 0755

View File

@ -1,9 +0,0 @@
---
- name: Build OCI images for personal usage
hosts: all
tasks:
- name: ltex-ls | Build the container image
tags: ltex
podman_image:
name: ltex-ls
path: containers/ltex-ls

View File

@ -1,142 +0,0 @@
---
- name: Install additional packages
hosts: all
gather_facts: yes
tasks:
- block:
- name: Install cliphist
tags: cliphist
command:
cmd: go install go.senan.xyz/cliphist@latest
# Avoid fzf.vim from distro repo
- name: Install fzf
tags: fzf
command:
cmd: go install github.com/junegunn/fzf@latest
- name: Install glow
tags: glow
command:
cmd: go install github.com/charmbracelet/glow@latest
- name: Install koneko
tags: koneko
command:
cmd: go install github.com/irevenko/koneko@latest
- name: Install what-anime-cli
tags: what-anime-cli
command:
cmd: go install github.com/irevenko/what-anime-cli@latest
- name: Install wiki
tags: wiki
command:
cmd: go install github.com/betapictoris/wiki@latest
- name: Install lux
tags: lux
command:
cmd: go install github.com/iawia002/lux@latest
- name: Install vim-startuptime
tags: vim
command:
cmd: go install github.com/rhysd/vim-startuptime@latest
# NOTE: Clair server is required
# - Install with 'go install github.com/quay/clair/v4/cmd/clair@latest' or use docker image
# - Clair server requires a PostgreSQL instance
# Default open on localhost:6060
- name: Install clairctl
tags: clair
command:
cmd: go install github.com/quay/clair/v4/cmd/clairctl@latest
- name: Install helmfile
tags: helmfile
command:
cmd: go install github.com/roboll/helmfile@latest
- name: Install rancher-cli
tags: rancher
command:
cmd: go install github.com/rancher/cli@latest
- name: Clean go modcache
command:
cmd: go clean -modcache
tags: go
environment:
GOPATH: '{{ ansible_env.HOME }}/.local/share/go'
GOPROXY: direct
- block:
- name: Install selene
tags: selene
community.general.cargo:
name: selene
state: latest
# texlab is not available on Cargo registry
- name: Install texlab
tags: texlab
command:
cmd: cargo install --git https://github.com/latex-lsp/texlab.git --locked --force
tags: rust
environment:
CARGO_HOME: '{{ ansible_env.HOME }}/.local/share/cargo'
- block:
- name: Install mermaid-cli
tags: mermaid
yarn:
name: '@mermaid-js/mermaid-cli'
global: yes
state: latest
- name: Install antora
tags: antora
yarn:
name: '{{ item }}'
global: yes
state: latest
loop:
- '@antora/cli'
- '@antora/site-generator'
environment:
NPM_CONFIG_PREFIX: ~/.local/share/npm
tags: [ yarn, npm ]
- name: Install pyenv
tags: pyenv
environment:
PYENV_ROOT: '{{ ansible_env.HOME }}/.local/share/pyenv'
import_tasks: tasks/pyenv.yml
- name: Install vagrant
tags: vagrant
vars:
- vagrant_dir: ~/Code/vagrant
import_tasks: tasks/vagrant.yml
- block:
- name: Install Anime4KCPP
tags: anime4kcpp
vars:
- anime4kcpp_dir: ~/Code/Anime4KCPP
import_tasks: tasks/anime4kcpp.yml
- name: Install tt
tags: tt
vars:
- tt_dir: ~/Code/tt
import_tasks: tasks/tt.yml
- name: Install zdict
tags: zdict
vars:
zdict_venv_dir: ~/.config/zdict
import_tasks: tasks/zdict.yml
tags: custom

24
playbooks/playbook.yml Normal file
View File

@ -0,0 +1,24 @@
---
# This playbook should be run in trunks with tags
- name: Tasks unrelated to dotfiles management
hosts: all
gather_facts: yes
roles:
- role: chroot
tags: chroot
- role: podman
tags: podman
- role: flatpak
tags: flatpak
- role: packages
tags: packages
- role: soundtheme
tags: [ sound, theme ]
- role: system
tags: system
become: yes
- role: wallpapers
tags: [ wallpaper, theme ]
- role: chromium
tags: chromium
become: yes

View File

@ -0,0 +1,23 @@
---
# https://superuser.com/questions/1333563/disable-history-in-chromium
- name: chromium | Create policy directory
file:
path: /etc/chromium/policies/managed
state: directory
mode: 0755
- name: chromium | Add custom policies
copy:
src: policy.json
dest: /etc/chromium/policies/managed/custom_policy.json
owner: root
group: root
mode: 0444
- name: chromium | Add Wayland Ozone flags
lineinfile:
path: /etc/chromium/chromium.conf
search_string: 'CHROMIUM_FLAGS='
line: CHROMIUM_FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --disable-sync-preferences --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache""
state: present
mode: 0644

View File

@ -0,0 +1,3 @@
---
chroot_dir: '{{ ansible_env.HOME }}/Alpine-chroot'
repository: https://dl-cdn.alpinelinux.org/alpine

View File

@ -0,0 +1,27 @@
---
- block:
- name: chroot | Ensure the chroot directory exists
file:
path: '{{ chroot_dir }}'
state: directory
mode: 0755
- name: chroot | Create the chroot
command:
cmd: 'apk -X {{ repository }}/edge/main -U --allow-untrusted -p {{ chroot_dir }} --initdb add alpine-base'
creates: '{{ chroot_dir }}/bin/busybox'
- name: chroot | Update the repository urls
template:
src: repositories.j2
dest: '{{ chroot_dir }}/etc/apk/repositories'
owner: root
group: root
mode: 0644
become: yes
- name: chroot | Install a stupid script for chrooting
template:
src: alpine-chroot.j2
dest: ~/.local/bin/alpine-chroot
mode: 0755

View File

@ -0,0 +1,2 @@
[Context]
sockets=!fallback-x11;!x11

View File

@ -0,0 +1,2 @@
[Context]
sockets=!fallback-x11;!x11

View File

@ -0,0 +1,2 @@
[Context]
sockets=!cups;!pulseaudio

View File

@ -0,0 +1,2 @@
[Context]
sockets=!fallback-x11;!x11

View File

@ -0,0 +1,2 @@
[Context]
sockets=!x11

View File

@ -0,0 +1,3 @@
[Context]
shared=!network
sockets=!x11

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/.themes

View File

@ -0,0 +1,2 @@
[Context]
sockets=!fallback-x11;!x11

View File

@ -0,0 +1,6 @@
[Context]
sockets=!pcsc;!fallback-x11;!x11
[Environment]
MOZ_DBUS_REMOTE=1
MOZ_USE_XINPUT2=

View File

@ -0,0 +1,2 @@
[Context]
sockets=!fallback-x11;!x11

View File

@ -0,0 +1,3 @@
[Context]
shared=!network
filesystems=!xdg-config/gtk-3.0;!xdg-config/GIMP

View File

@ -0,0 +1,4 @@
[Context]
shared=!network
sockets=!x11
devices=dri

View File

@ -0,0 +1,2 @@
[Context]
shared=!network

View File

@ -0,0 +1,6 @@
[Context]
shared=!network
sockets=!pulseaudio;!fallback-x11;!x11
[Environment]
SAL_USE_VCLPLUGIN=gtk3

View File

@ -0,0 +1,3 @@
[Context]
sockets=!x11
filesystems=!xdg-config/kdeglobals

View File

@ -0,0 +1,3 @@
[Context]
sockets=!cups;!pcsc;!ssh-auth;!fallback-x11;!x11
devices=!all;shm;dri

View File

@ -0,0 +1,29 @@
---
- name: flatpak | Create policy override directory
file:
path: ~/.local/share/flatpak/overrides
state: directory
mode: 0755
- name: flatpak | Copy override policies for common apps
copy:
src: '{{ item }}'
dest: '~/.local/share/flatpak/overrides/{{ item }}'
force: yes
mode: 0644
loop:
- com.github.micahflee.torbrowser-launcher
- com.github.tchx84.Flatseal
- com.github.vladimiry.ElectronMail
- com.github.wwmm.easyeffects
- com.obsproject.Studio
- global
- info.febvre.Komikku
- io.gitlab.librewolf-community
- net.jami.Jami
- org.gimp.GIMP
- org.inkscape.Inkscape
- org.kde.krita
- org.libreoffice.LibreOffice
- org.qbittorrent.qBittorrent
- org.remmina.Remmina

View File

@ -1,32 +1,32 @@
---
- name: Install dependencies
- name: anime4kcpp | Install dependencies
apk:
name: cmake, opencv-dev, opencl-dev
state: present
tags: system
become: yes
- name: Clone Anime4KCPP repository
- name: anime4kcpp | Clone Anime4KCPP repository
git:
depth: 1
repo: https://github.com/TianZerL/Anime4KCPP.git
dest: '{{ anime4kcpp_dir }}'
- name: Make build directory
- name: anime4kcpp | Make build directory
file:
path: '{{ anime4kcpp_dir }}/build'
state: directory
- name: Generate cmake build files
- name: anime4kcpp | Generate cmake build files
command:
chdir: '{{ anime4kcpp_dir }}/build'
cmd: cmake ..
- name: Build Anime4KCPP CLI
- name: anime4kcpp | Build Anime4KCPP CLI
community.general.make:
chdir: '{{ anime4kcpp_dir }}/build'
- name: Symlink Anime4KCPP_CLI executable
- name: anime4kcpp | Symlink Anime4KCPP_CLI executable
file:
src: '{{ anime4kcpp_dir }}/build/bin/Anime4KCPP_CLI'
dest: ~/.local/bin/Anime4KCPP_CLI

View File

@ -0,0 +1,138 @@
---
- block:
- name: packages | Install cliphist
tags: cliphist
command:
cmd: go install go.senan.xyz/cliphist@latest
# Avoid fzf.vim from distro repo
- name: packages | Install fzf
tags: fzf
command:
cmd: go install github.com/junegunn/fzf@latest
- name: packages | Install glow
tags: glow
command:
cmd: go install github.com/charmbracelet/glow@latest
- name: packages | Install koneko
tags: koneko
command:
cmd: go install github.com/irevenko/koneko@latest
- name: packages | Install what-anime-cli
tags: what-anime-cli
command:
cmd: go install github.com/irevenko/what-anime-cli@latest
- name: packages | Install wiki
tags: wiki
command:
cmd: go install github.com/betapictoris/wiki@latest
- name: packages | Install lux
tags: lux
command:
cmd: go install github.com/iawia002/lux@latest
- name: packages | Install vim-startuptime
tags: vim
command:
cmd: go install github.com/rhysd/vim-startuptime@latest
# NOTE: Clair server is required
# - Install with 'go install github.com/quay/clair/v4/cmd/clair@latest' or use docker image
# - Clair server requires a PostgreSQL instance
# Default open on localhost:6060
- name: packages | Install clairctl
tags: clair
command:
cmd: go install github.com/quay/clair/v4/cmd/clairctl@latest
- name: packages | Install helmfile
tags: helmfile
command:
cmd: go install github.com/roboll/helmfile@latest
- name: packages | Install rancher-cli
tags: rancher
command:
cmd: go install github.com/rancher/cli@latest
- name: packages | Clean go modcache
command:
cmd: go clean -modcache
tags: go
environment:
GOPATH: '{{ ansible_env.HOME }}/.local/share/go'
GOPROXY: direct
- block:
- name: packages | Install selene
tags: selene
community.general.cargo:
name: selene
state: latest
# texlab is not available on Cargo registry
- name: packages | Install texlab
tags: texlab
command:
cmd: cargo install --git https://github.com/latex-lsp/texlab.git --locked --force
tags: rust
environment:
CARGO_HOME: '{{ ansible_env.HOME }}/.local/share/cargo'
- block:
- name: packages | Install mermaid-cli
tags: mermaid
yarn:
name: '@mermaid-js/mermaid-cli'
global: yes
state: latest
- name: packages | Install antora
tags: antora
yarn:
name: '{{ item }}'
global: yes
state: latest
loop:
- '@antora/cli'
- '@antora/site-generator'
environment:
NPM_CONFIG_PREFIX: ~/.local/share/npm
tags: [ yarn, npm ]
- name: packages | Install pyenv
tags: pyenv
environment:
PYENV_ROOT: '{{ ansible_env.HOME }}/.local/share/pyenv'
import_tasks: pyenv.yml
- name: packages | Install vagrant
tags: vagrant
vars:
- vagrant_dir: ~/Code/vagrant
import_tasks: vagrant.yml
- block:
- name: packages | Install Anime4KCPP
tags: anime4kcpp
vars:
- anime4kcpp_dir: ~/Code/Anime4KCPP
import_tasks: anime4kcpp.yml
- name: packages | Install tt
tags: tt
vars:
- tt_dir: ~/Code/tt
import_tasks: tt.yml
- name: packages | Install zdict
tags: zdict
vars:
zdict_venv_dir: ~/.config/zdict
import_tasks: zdict.yml
tags: custom_packages

View File

@ -1,11 +1,11 @@
---
- name: Clone pyenv
- name: pyenv | Clone pyenv repository
git:
depth: 1
repo: https://github.com/pyenv/pyenv.git
dest: '{{ ansible_env.PYENV_ROOT }}'
- name: Clone pyenv plugins
- name: pyenv | Clone pyenv plugins
git:
depth: 1
repo: 'https://github.com/pyenv/{{ item }}.git'
@ -14,13 +14,13 @@
- pyenv-update
- pyenv-virtualenv
- name: Symlink pyenv executable
- name: pyenv | Symlink pyenv executable
file:
src: '{{ ansible_env.PYENV_ROOT }}/libexec/pyenv'
dest: ~/.local/bin/pyenv
state: link
- name: Add fish startup hooks
- name: pyenv | Add fish startup hooks
tags: fish
blockinfile:
path: ~/.config/fish/config.fish
@ -29,3 +29,4 @@
status is-login; and pyenv init --path | source
status is-interactive; and pyenv init - | source
status is-interactive; and pyenv virtualenv-init - | source
state: present

View File

@ -1,17 +1,17 @@
---
- name: Clone tt repository
- name: tt | Clone tt repository
git:
depth: 1
repo: https://github.com/runrin/tt.git
dest: '{{ tt_dir }}'
- name: Build tt
- name: tt | Build tt
community.general.make:
chdir: '{{ tt_dir }}'
- name: Install custom launcher for tt
- name: tt | Install custom launcher for tt
template:
src: ../templates/tt.j2
src: tt.j2
dest: ~/.local/bin/tt
mode: 0755
force: yes

View File

@ -1,38 +1,38 @@
---
- name: Install system dependencies
- name: vagrant | Install system dependencies
apk:
name: libvirt-dev, ruby-bundler
state: present
tags: system
become: yes
- name: Clone vagant
- name: vagrant | Clone vagant repository
git:
depth: 1
repo: https://github.com/hashicorp/vagrant.git
dest: '{{ vagrant_dir }}'
- name: Build vagrant
- name: vagrant | Build vagrant
bundler:
chdir: '{{ vagrant_dir }}'
state: present
gem_path: vendor
binstub_directory: exec
- name: Symlink vagrant executable
- name: vagrant | Symlink vagrant executable
file:
src: '{{ vagrant_dir }}/exec/vagrant'
dest: ~/.local/bin/vagrant
state: link
- name: Check whether vagrant-libvirt plugin is installed
- name: vagrant | Check whether vagrant-libvirt plugin is installed
shell:
cmd: ~/.local/bin/vagrant plugin list | grep -qF 'vagrant-libvirt'
register: vagrant_plugin_check
changed_when: no
failed_when: no
- name: Install vagrant-libvirt plugin
- name: vagrant | Install vagrant-libvirt plugin
command:
cmd: ~/.local/bin/vagrant plugin install vagrant-libvirt
when: vagrant_plugin_check.rc == 1

View File

@ -1,16 +1,16 @@
---
- name: Create venv directory
- name: zdict | Create venv directory
file:
path: '{{ zdict_venv_dir }}'
state: directory
mode: 0755
- name: Install zdict with pip
- name: zdict | Install zdict with pip
pip:
name: zdict
virtualenv: '{{ zdict_venv_dir }}'
- name: Symlink zdict executable
- name: zdict | Symlink zdict executable
file:
src: '{{ zdict_venv_dir }}/bin/zdict'
dest: ~/.local/bin/zdict

View File

@ -0,0 +1,13 @@
---
- name: podman | Pull hadolint container image
tags: hadolint
podman_image:
name: docker.io/hadolint/hadolint
tag: latest
state: present
- name: podman | Build ltex-ls container image
tags: ltex
podman_image:
name: ltex-ls
path: ltex-ls

View File

@ -0,0 +1,82 @@
---
# These archives will never be changed, so use checksum
- name: soundtheme | Create sound theme directory
file:
path: ~/.local/share/sounds
state: directory
mode: 0755
- name: soundtheme | Download kayo sound theme archive
get_url:
url: https://oss-ch.info/data/kayo-thema.tar.gz
dest: /tmp/kayo-thema.tar.gz
mode: 0644
checksum: sha256:cbcd1c90c253cb7cf84a04383cb29a1ab8bb5553cbe6c374b6ee1d0e3b35c1f4
- name: soundtheme | Download sakura sound theme archive
get_url:
url: https://oss-ch.info/data/sakura-thema.tar.gz
dest: /tmp/sakura-thema.tar.gz
mode: 0644
checksum: sha256:2cc410c1a692c8a11a6308799392c14e8509c627ead14e24a6052796101f0ccb
- name: soundtheme | Download libreoffice-writer sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_writer.tgz
dest: /tmp/lbr_ubuntu_writer.tgz
mode: 0644
checksum: sha256:fbfec3edfad3b60891fcac956f1beef2e9ce2b74f7e27796e611c7a19ae55cfc
- name: soundtheme | Download libreoffice-impress sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_impress.tgz
dest: /tmp/lbr_ubuntu_impress.tgz
mode: 0644
checksum: sha256:29cd56b1190bf3073fca742bd40ffe33df7c4e4d5af1a19fd21d1d76d3bba681
- name: soundtheme | Download libreoffice-calc sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_calc.tgz
dest: /tmp/lbr_ubuntu_calc.tgz
mode: 0644
checksum: sha256:4eb40e988f6cf3ebc4ef31bde8518190257bcb9e45f6cd125f0915788f5001f1
- name: soundtheme | Download libreoffice-draw sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_draw.tgz
dest: /tmp/lbr_ubuntu_draw.tgz
mode: 0644
checksum: sha256:bc8f9398d653dfe84a6561ed783ab1e4b53c03c2652f747cf9c32412292fb307
- name: soundtheme | Install sakura and kayo sound themes
command: 'tar -xzf /tmp/{{ item }}-thema.tar.gz'
args:
chdir: ~/.local/share/sounds
creates: '~/.local/share/sounds/{{ item }}/index.theme'
loop:
- kayo
- sakura
- name: soundtheme | Extract Libreoffice sound themes to /tmp
command: 'tar -xzf /tmp/lbr_ubuntu_{{ item }}.tgz'
args:
chdir: /tmp
creates: /tmp/usr/share/sounds/LBR_{{ item | capitalize }}/index.theme
loop:
- writer
- impress
- draw
- calc
- name: soundtheme | Install Libreoffice sound themes
copy:
src: /tmp/usr/share/sounds/LBR_{{ item | capitalize }}
dest: ~/.local/share/sounds/
directory_mode: 0755
mode: 0644
loop:
- writer
- impress
- draw
- calc

View File

@ -0,0 +1,43 @@
---
- name: system | Update the system
tags: upgrade
apk:
available: yes
upgrade: yes
update_cache: yes
# Install mesa-dri-gallium or mesa-dri-classic as well for a working
# desktop environment
- name: system | Install common packages
tags: depend
apk:
name: >-
aerc, amfora, ansible-lint, atool, bash, bat, brillo, build-base, pv,
buildah, cargo, clang, clang-analyzer, clang-extra-tools, go, age, xz,
clipman, cmake, cppcheck, curl, docs, dunst, editorconfig, exa, syft,
extra-cmake-modules, exiftool, fd, ffmpeg, ethtool, chafa, git-extras,
ffmpegthumbnailer, flatpak, font-noto, font-iosevka-aile, foot, inxi,
font-iosevka-etoile, font-iosevka-slab, font-iosevka-base, ddgr, croc,
font-noto-emoji, gdb, git-email, git-lfs, gpg, grim, buku, drill,
gnupg-doc, jq, iproute2, gst-plugins-pipewire, sops, imagemagick,
libarchive-tools, libffi-dev, qalc, love, bombadillo, mupdf-tools,
man-pages-posix, man-pages, meson, mpc, mpd, mpdris2, pavucontrol-qt,
mpv, mpv-mpris, ncmpcpp, neovim, npm, yarn, pandoc, k9s, rustscan,
py3-pynvim, newsboat, ngrep, nmap, nushell, packer, rsync, clifm,
pcmanfm-qt, pinentry-qt, pipewire, sway, swappy, sshfs, step-cli, xh,
pipewire-pulse, playerctl, qimgv, qt5ct, pipewire-tools, kubectl,
py3-virtualenv, py3-setuptools, ripgrep, senpai, shellcheck, castero,
slurp, sqlite, starship, strace, stylua, swayidle, swaylock, cosign,
tcpdump, texlive-full, tokei, trivy, vifm, valgrind, steghide, helm,
vulkan-loader, waybar, wireplumber, wf-recorder, wlr-randr, lite-xl,
xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-user-dirs, gpg-tui,
xwayland, zathura, zathura-cb, zathura-ps, zoxide, openssh-doc, procs,
zathura-pdf-mupdf, openssh-client-default, btop, zellij, gallery-dl,
alacritty, unifont, python3-dev, py3-proxmoxer, lua5.4-posix, abook,
rofi-calc, rofi-wayland, rofi-file-browser-extended, rofi-emoji,
automake, autoconf, libtool, mbuffer, onefetch, flawfinder, weechat,
weechat-lua, weechat-python, py3-websocket-client, weechat-spell,
aspell-en, aspell, chromium, distrobox, emacs-x11-nativecomp, htmlq,
kompose, mercurial, mlocate, nvme-cli, smartmontools, tea, terra,
terraform, testdisk, tzdata, xonsh, yamllint
state: present

View File

@ -0,0 +1,2 @@
---
wallpaper_dir: ~/Pictures/Wallpapers

View File

@ -0,0 +1,39 @@
---
- name: wallpapers | Create wallpaper directory if missing
file:
path: '{{ wallpaper_dir }}'
state: directory
- name: wallpapers | An artwork by @ogipote
get_url:
url: https://ogipote.com/wp-content/uploads/2021/03/%E3%83%AC%E3%82%A4%E3%83%A4%E3%83%BC5.jpg
dest: '{{ wallpaper_dir }}/レイヤー5.jpg'
mode: 0644
- name: wallpapers | Key artwork of Sayoasa anime
get_url:
url: http://sayoasa.jp/en/img/top/key.jpg
dest: '{{ wallpaper_dir }}/key.jpg'
mode: 0644
# tumblr has good enough image quality
- name: wallpapers | Maquia artwork by @necomi
get_url:
url: https://64.media.tumblr.com/269736b9e0af3be25460f469fa2c06f4/tumblr_p6b2chhj2g1v84cqao1_1280.png
dest: '{{ wallpaper_dir }}/maquia.png'
mode: 0644
tags: never
# Rimuu has her site rewritten. The artworks are now in crappy webp format
# generated by wix.com so let's upload 1 to Github and call it a day
- name: wallpapers | Barbara artwork by @rimuu
get_url:
url: https://github.com/FollieHiyuki/FollieHiyuki/raw/main/wallpapers/90575757_p0.png
dest: '{{ wallpaper_dir }}/90575757_p0.png'
mode: 0644
- name: wallpapers | Short Fubuki animation by @kaynimatic
command:
cmd: ~/.local/bin/gallery-dl https://twitter.com/i/status/1324684931885273088
creates: ~/Pictures/gallery-dl/twitter/kaynimatic/1324684931885273088_1.mp4
tags: never

View File

@ -1,84 +0,0 @@
---
# These archives will never be changed, so use checksum
- name: Download and install cute sound themes
hosts: all
tasks:
- name: Create sound theme directory
file:
path: ~/.local/share/sounds
state: directory
mode: 0755
- name: Download kayo sound theme archive
get_url:
url: https://oss-ch.info/data/kayo-thema.tar.gz
dest: /tmp/kayo-thema.tar.gz
mode: 0644
checksum: sha256:cbcd1c90c253cb7cf84a04383cb29a1ab8bb5553cbe6c374b6ee1d0e3b35c1f4
- name: Download sakura sound theme archive
get_url:
url: https://oss-ch.info/data/sakura-thema.tar.gz
dest: /tmp/sakura-thema.tar.gz
mode: 0644
checksum: sha256:2cc410c1a692c8a11a6308799392c14e8509c627ead14e24a6052796101f0ccb
- name: Download libreoffice-writer sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_writer.tgz
dest: /tmp/lbr_ubuntu_writer.tgz
mode: 0644
checksum: sha256:fbfec3edfad3b60891fcac956f1beef2e9ce2b74f7e27796e611c7a19ae55cfc
- name: Download libreoffice-impress sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_impress.tgz
dest: /tmp/lbr_ubuntu_impress.tgz
mode: 0644
checksum: sha256:29cd56b1190bf3073fca742bd40ffe33df7c4e4d5af1a19fd21d1d76d3bba681
- name: Download libreoffice-calc sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_calc.tgz
dest: /tmp/lbr_ubuntu_calc.tgz
mode: 0644
checksum: sha256:4eb40e988f6cf3ebc4ef31bde8518190257bcb9e45f6cd125f0915788f5001f1
- name: Download libreoffice-draw sound theme archive
get_url:
url: https://oss-ch.info/lbr/lbr_ubuntu_draw.tgz
dest: /tmp/lbr_ubuntu_draw.tgz
mode: 0644
checksum: sha256:bc8f9398d653dfe84a6561ed783ab1e4b53c03c2652f747cf9c32412292fb307
- name: Install sakura/kayo sound theme
command: 'tar -xzf /tmp/{{ item }}-thema.tar.gz'
args:
chdir: ~/.local/share/sounds
creates: '~/.local/share/sounds/{{ item }}/index.theme'
loop:
- kayo
- sakura
- name: Extract Libreoffice sound themes to /tmp
command: 'tar -xzf /tmp/lbr_ubuntu_{{ item }}.tgz'
args:
chdir: /tmp
creates: /tmp/usr/share/sounds/LBR_{{ item | capitalize }}/index.theme
loop:
- writer
- impress
- draw
- calc
- name: Install Libreoffice sound themes
copy:
src: /tmp/usr/share/sounds/LBR_{{ item | capitalize }}
dest: ~/.local/share/sounds/
directory_mode: 0755
mode: 0644
loop:
- writer
- impress
- draw
- calc

View File

@ -1,62 +0,0 @@
---
- name: Do tasks that need 'root'
hosts: all
become: yes
tasks:
- name: Update the system
tags: upgrade
apk:
available: yes
upgrade: yes
update_cache: yes
# Install mesa-dri-gallium or mesa-dri-classic as well for a working
# desktop environment
- name: Install dependencies
tags: depend
apk:
name: >-
aerc, amfora, ansible-lint, atool, bash, bat, brillo, build-base, pv,
buildah, cargo, clang, clang-analyzer, clang-extra-tools, go, age, xz,
clipman, cmake, cppcheck, curl, docs, dunst, editorconfig, exa, syft,
emacs-x11, extra-cmake-modules, exiftool, fd, ffmpeg, ethtool, chafa,
ffmpegthumbnailer, flatpak, font-noto, font-iosevka-aile, foot, inxi,
font-iosevka-etoile, font-iosevka-slab, font-iosevka-base, ddgr,
font-noto-emoji, gdb, git-email, git-lfs, gpg, grim, buku, drill,
gnupg-doc, jq, iproute2, gst-plugins-pipewire, sops, imagemagick,
libarchive-tools, libffi-dev, qalc, love, bombadillo, mupdf-tools,
man-pages-posix, man-pages, meson, mpc, mpd, mpdris2, pavucontrol-qt,
mpv, mpv-mpris, ncmpcpp, neovim, npm, yarn, pandoc, k9s, rustscan,
py3-pynvim, newsboat, ngrep, nmap, nushell, packer, rsync,
pcmanfm-qt, pinentry-qt, podman, pipewire, sway, swappy, sshfs,
pipewire-pulse, playerctl, qimgv, qt5ct, pipewire-tools, kubectl,
py3-virtualenv, py3-setuptools, ripgrep, senpai, shellcheck, castero,
slurp, sqlite, starship, strace, stylua, swayidle, swaylock, cosign,
tcpdump, texlive-full, tokei, trivy, vifm, valgrind, steghide,
vulkan-loader, waybar, wireplumber, wf-recorder, wlr-randr, lite-xl,
xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, xdg-user-dirs,
xwayland, zathura, zathura-cb, zathura-ps, zoxide, openssh-doc,
zathura-pdf-mupdf, openssh-client-default, btop, zellij, gallery-dl,
alacritty, unifont, python3-dev, py3-proxmoxer, lua5.4-posix, abook,
rofi-calc, rofi-wayland, rofi-file-browser-extended, rofi-emoji,
automake, autoconf, libtool, mbuffer, onefetch, flawfinder, weechat,
weechat-lua, weechat-python, py3-websocket-client, weechat-spell,
aspell-en, aspell
state: present
# https://superuser.com/questions/1333563/disable-history-in-chromium
- block:
- name: Create Chromium policy directory
file:
path: /etc/chromium/policies/managed
state: directory
mode: 0755
- name: Add custom Chromium policies
copy:
src: files/policy.json
dest: /etc/chromium/policies/managed/custom_policy.json
owner: root
group: root
mode: 0444
tags: chromium

View File

@ -1,44 +0,0 @@
---
- name: Download some wallpapers
hosts: all
vars:
- wallpaper_dir: ~/Pictures/Wallpapers
tasks:
- name: Create wallpaper directory if missing
file:
path: '{{ wallpaper_dir }}'
state: directory
- name: An artwork by @ogipote
get_url:
url: https://ogipote.com/wp-content/uploads/2021/03/%E3%83%AC%E3%82%A4%E3%83%A4%E3%83%BC5.jpg
dest: '{{ wallpaper_dir }}/レイヤー5.jpg'
mode: 0644
- name: Key artwork of Sayoasa anime
get_url:
url: http://sayoasa.jp/en/img/top/key.jpg
dest: '{{ wallpaper_dir }}/key.jpg'
mode: 0644
# tumblr has good enough image quality
- name: Maquia artwork by @necomi
get_url:
url: https://64.media.tumblr.com/269736b9e0af3be25460f469fa2c06f4/tumblr_p6b2chhj2g1v84cqao1_1280.png
dest: '{{ wallpaper_dir }}/maquia.png'
mode: 0644
tags: never
# Rimuu has her site rewritten. The artworks are now in crappy webp format
# generated by wix.com so let's upload 1 to Github and call it a day
- name: Barbara artwork by @rimuu
get_url:
url: https://github.com/FollieHiyuki/FollieHiyuki/raw/main/wallpapers/90575757_p0.png
dest: '{{ wallpaper_dir }}/90575757_p0.png'
mode: 0644
- name: Short Fubuki animation by @kaynimatic
command:
cmd: ~/.local/bin/gallery-dl https://twitter.com/i/status/1324684931885273088
creates: ~/Pictures/gallery-dl/twitter/kaynimatic/1324684931885273088_1.mp4
tags: never

View File

@ -10,7 +10,6 @@
path: ~/.ssh/config
mode: 0600
state: touch
when: not dropbear_ssh_client
# Use blockinfile instead of lineinfile to have nice space
# between config section
@ -18,9 +17,9 @@
blockinfile:
path: ~/.ssh/config
block: |
AddKeysToAgent no
StrictHostKeyChecking accept-new
insertbefore: BOF
marker: '# {mark} CUSTOM SSH CONFIG'
state: present
mode: 0600
when: not dropbear_ssh_client