Your play uses `with_items` and you have been asked to modernise. What changes?
BeginnerScenarioVariables, Facts and Templates
Answer
Situation read → Legacy loop syntax.
What I'd do → Replace with_items: "{{ list }}" by loop: "{{ list }}". For nested or flattened lists use filters.
loop: "{{ users | product(groups) | list }}" # was with_nested
loop: "{{ dict | dict2items }}" # was with_dict
Why → loop is the recommended keyword; with_* still works but hides what is happening.
Interview tip → with_items flattens one level automatically; loop does not, so use | flatten(1).
More on Variables, Facts and Templates
A variable you set in `group_vars` is being overridden and you do not know where. How do you find the source?IntermediateYou need different values per environment without copying playbooks.BeginnerYou must render an Nginx config with one `server` block per site from a list.IntermediateA template needs the IPs of all hosts in the `db` group, for example for a replication config.IntermediateNothing should be rendered unless a mandatory variable is supplied.BeginnerPer-host values, like `server_id` for MySQL, must be unique and stable.Intermediate