2026-06-11 13:50:11 +02:00
|
|
|
---
|
|
|
|
|
- name: Converge
|
|
|
|
|
hosts: all
|
|
|
|
|
become: true
|
|
|
|
|
gather_facts: true
|
|
|
|
|
vars:
|
|
|
|
|
dev_env__users:
|
|
|
|
|
- tester
|
|
|
|
|
pre_tasks:
|
2026-06-14 19:06:15 +02:00
|
|
|
# `always` so the test user exists even under a partial `--tags` converge.
|
2026-06-11 13:50:11 +02:00
|
|
|
- name: Create a test user to receive the environment
|
|
|
|
|
ansible.builtin.user:
|
|
|
|
|
name: tester
|
|
|
|
|
create_home: true
|
2026-06-14 19:06:15 +02:00
|
|
|
tags: [always]
|
2026-06-11 13:50:11 +02:00
|
|
|
roles:
|
|
|
|
|
- role: dev_env
|
2026-06-14 19:06:15 +02:00
|
|
|
|
|
|
|
|
# Partial-tags regression guard (O8): apply only the `config` concern to a fresh user.
|
|
|
|
|
# The dev_env__home preflight is tagged `always`, so a config-only run must still resolve
|
|
|
|
|
# the home dir and stow the dotfiles. Run the true partial path with:
|
|
|
|
|
# molecule converge -- --tags config
|
|
|
|
|
# (a full `molecule test` runs every tag, which still exercises this play idempotently).
|
|
|
|
|
- name: Converge — config concern only, fresh user
|
|
|
|
|
hosts: all
|
|
|
|
|
become: true
|
|
|
|
|
gather_facts: true
|
|
|
|
|
vars:
|
|
|
|
|
dev_env__users:
|
|
|
|
|
- tagtester
|
|
|
|
|
pre_tasks:
|
|
|
|
|
# `always` so the test user exists even under a partial `--tags config` converge.
|
|
|
|
|
- name: Create a second test user for the config-only path
|
|
|
|
|
ansible.builtin.user:
|
|
|
|
|
name: tagtester
|
|
|
|
|
create_home: true
|
|
|
|
|
tags: [always]
|
|
|
|
|
tasks:
|
|
|
|
|
- name: Apply dev_env restricted to the config concern
|
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
|
name: dev_env
|
|
|
|
|
apply:
|
|
|
|
|
tags: [config]
|
|
|
|
|
tags: [config]
|