boma/roles/dev_env/tasks/main.yml
sjat 9b5851ba4b chore(roles): role/test hygiene from review (O16,O17,O25,O26)
- dev_env .zshrc: drop the rclone alias (not installed) and guard the direnv
  hook with `command -v direnv` so a missing direnv doesn't error every shell (O16)
- dev_env oh-my-posh: tag the zen.toml theme deploy `config` (it renders config to
  disk like the per_user dotfiles); the include now carries packages+config so a
  `--tags config` run re-renders the theme while the binary install stays packages
  only (O17). Verified via `molecule converge -- --tags config`.
- drop the non-vocabulary `tags: [verify]` from molecule verify playbooks across
  base/docker_host/public_dns/reverse_proxy (check-tags exempts molecule anyway) (O25)
- reverse_proxy templates: add the `{{ ansible_managed }}` header (ADR-024 §1.2) (O26)

make lint green; dev_env + reverse_proxy molecule green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:31:23 +02:00

50 lines
1.7 KiB
YAML

---
- name: Install developer-environment packages
ansible.builtin.apt:
name: "{{ dev_env__packages }}"
state: present
update_cache: true
cache_valid_time: 3600
tags: [packages]
# `apply: tags:` propagates the concern tag onto the INCLUDED tasks — without it a tag on
# a dynamic include_tasks only selects the include itself, not its (untagged) contents, so
# `--tags <concern>` would run nothing (Ansible gotcha; mirrors roles/base/tasks/main.yml).
- name: Install Neovim (pinned release)
ansible.builtin.include_tasks:
file: neovim.yml
apply:
tags: [packages]
tags: [packages]
# Also reachable under `config`: oh_my_posh.yml renders /etc/oh-my-posh/zen.toml (a config
# task, tagged `config` within the file) alongside the binary install (`packages`). apply
# keeps `packages` on the untagged binary tasks; the include carries both so `--tags config`
# enters it and re-renders just the theme.
- name: Install oh-my-posh prompt (pinned release)
ansible.builtin.include_tasks:
file: oh_my_posh.yml
apply:
tags: [packages]
tags: [packages, config]
- name: Install Node.js (pinned release)
ansible.builtin.include_tasks:
file: nodejs.yml
apply:
tags: [packages]
tags: [packages]
# per_user.yml resolves dev_env__home (tagged `always`, below) then runs both the `users`
# (login shell) and `config` (dotfiles/stow) concerns; tag + apply both so either
# `--tags users` or `--tags config` reaches in and the home-dir preflight always runs.
- name: Configure each developer user
ansible.builtin.include_tasks:
file: per_user.yml
apply:
tags: [users, config]
loop: "{{ dev_env__users }}"
loop_control:
loop_var: dev_env__user
label: "{{ dev_env__user }}"
tags: [users, config]