16 lines
565 B
YAML
16 lines
565 B
YAML
---
|
|
- name: Pre-processing
|
|
tags: always
|
|
block:
|
|
- name: Load users
|
|
include_vars:
|
|
file: users.yml
|
|
- name: Reconcile user targets with host targets to get host users
|
|
set_fact:
|
|
local_users: "{{ local_users | default([]) + [item if item.targets | intersect(targets) else None] }}"
|
|
with_items: "{{ users }}"
|
|
- name: Get administrative users
|
|
set_fact:
|
|
local_admin_users: "{{ local_admin_users | default([]) + [item.name if item.admin else None] }}"
|
|
with_items: "{{ local_users | difference([None]) }}"
|