feat(inventory): Add local inventory

Can be used to have the ansible playbook run on the currently running
(host) machine, using a local connection instead of a chroot.

TODO: This _will_ change your host machine so be careful running this.
Additionally, we need to find a way to deduplicate the inventory
variables since we have them doubled for chroot/local now.
This commit is contained in:
Marty Oehme 2025-02-23 15:13:17 +01:00 committed by Marty Oehme
parent cf9e8165df
commit 3bcf928bc5

120
inventory_local.yaml Normal file
View file

@ -0,0 +1,120 @@
# example separation of packages: GUIs and DEs in workstation, only terminal in headless
workstation:
children:
target_system: # mark this the current target system
headless:
children:
target_system:
children:
local_target:
vars:
desired_package_state: latest
hostsystem:
chroot_target:
hosts:
void_chrooted:
ansible_host: /mnt/void
ansible_connection: community.general.chroot
ansible_chroot_exe: arch-chroot
local_target:
hosts:
void_local:
ansible_host: 127.0.0.1
ansible_connection: ansible.builtin.local
interface:
children:
workstation:
vars:
fonts:
- nerd-fonts-otf
- noto-fonts-ttf
- noto-fonts-cjk
- noto-fonts-emoji
packages_de:
- bemenu
- pinentry-bemenu
- clipman
- grim
- kanshi
- mako
- slurp
- waylock
packages_gui:
- gimp
- qutebrowser
- sioyek
- wdisplays
terminal:
children:
workstation:
headless:
vars:
packages_terminal:
- abduco
- ansible # FIXME: not in other inventory, see how to deduplicate to keep DRY
- atuin
- autofs
- bat
- bc
- bottom
- brightnessctl
- chafa
- docker
- docker-compose
- docx2txt
- duf
- dust
- entr
- eza
- fd
- flavours # TODO: To be replaced with tinty
- fwupd
- gallery-dl
- git-lfs
- htop
- iftop
- jrnl
- khal
- khard
- moreutils
- msmtp
- neomutt
- neovim
- newsboat
- nushell
- papis
- pass
- pdftk
- podman
- restic
- ripgrep
- sc-im
- starship
- swaybg
- swayidle
- task
- tasksh
- tectonic
- thermald
- timewarrior
- topgrade
- uv
- vdirsyncer
- vifm
- visidata
- wezterm
- wlopm
- wlsunset
- wtype
- yt-dlp
- zk
- zoxide
- zr # zsh plugin manager
- zsh