boma/roles/dev_env/molecule/default/verify.yml
sjat f3f382ae69 Add dev_env role: zsh/tmux/nvim for workstation-class hosts
A new role (separate from base) that gives workstation-class hosts (ubongo
now, mamba later) a clean interactive environment: zsh + oh-my-zsh +
oh-my-posh, tmux + TPM plugins, and neovim. Dotfiles are real files deployed
via GNU stow (not templated); pinned nvim v0.12.2 + oh-my-posh 29.0.1.

Configs re-derived (ADR-013) from AnsibleBaobabV4 + the operator's fisi setup
on boma's terms: no Nerd Font (headless host), no system LSP suite (nvim uses
mason), versions pinned (V4 tracks latest). Applied via playbooks/workstation.yml
to the control group for users sjat + claude. Lint + Molecule (idempotent) green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 13:50:11 +02:00

73 lines
2.2 KiB
YAML

---
- name: Verify
hosts: all
become: true
gather_facts: false
tasks:
- name: Gather installed-package facts
ansible.builtin.package_facts:
manager: apt
- name: Assert core packages are present
ansible.builtin.assert:
that:
- "'zsh' in ansible_facts.packages"
- "'tmux' in ansible_facts.packages"
- "'stow' in ansible_facts.packages"
- "'direnv' in ansible_facts.packages"
fail_msg: core dev_env packages missing
- name: Stat system binaries and theme
ansible.builtin.stat:
path: "{{ item }}"
loop:
- /usr/local/bin/nvim
- /usr/local/bin/oh-my-posh
- /etc/oh-my-posh/zen.toml
register: dev_env__sys
loop_control:
label: "{{ item }}"
- name: Assert system tools are installed
ansible.builtin.assert:
that:
- dev_env__sys.results[0].stat.exists
- dev_env__sys.results[1].stat.exists
- dev_env__sys.results[2].stat.exists
fail_msg: nvim/oh-my-posh/zen.toml missing
- name: Look up the test user
ansible.builtin.getent:
database: passwd
key: tester
- name: Assert tester login shell is zsh
ansible.builtin.assert:
that:
- "getent_passwd['tester'][5] == '/usr/bin/zsh'"
fail_msg: tester login shell was not set to zsh
- name: Stat tester dotfiles and frameworks
ansible.builtin.stat:
path: "{{ item }}"
loop:
- /home/tester/.zshrc
- /home/tester/.tmux.conf
- /home/tester/.config/nvim/init.lua
- /home/tester/.oh-my-zsh
- /home/tester/.tmux/plugins/tpm
register: dev_env__dots
loop_control:
label: "{{ item }}"
- name: Assert dotfiles are stowed (symlinks) and frameworks cloned
ansible.builtin.assert:
that:
- dev_env__dots.results[0].stat.exists
- dev_env__dots.results[0].stat.islnk
- dev_env__dots.results[1].stat.exists
- dev_env__dots.results[1].stat.islnk
- dev_env__dots.results[2].stat.exists
- dev_env__dots.results[3].stat.exists
- dev_env__dots.results[4].stat.exists
fail_msg: dotfiles not stowed or omz/tpm not cloned