boma/roles/dev_env/tasks/main.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

---
- 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]
- name: Install oh-my-posh prompt (pinned release)
ansible.builtin.include_tasks:
file: oh_my_posh.yml
apply:
tags: [packages]
tags: [packages]
- 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]