--- - 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 ` 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]