From 95fc8f1936206fbfdd632df267b3d38ec82a4167 Mon Sep 17 00:00:00 2001 From: MAHDTech Date: Tue, 30 Nov 2021 14:49:24 +1100 Subject: [PATCH] Move user info to a fact (#91) --- .../identity-management/queue/user-management.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inventory-generation/identity-management/queue/user-management.yml b/inventory-generation/identity-management/queue/user-management.yml index 95d72f4..7c9fe80 100644 --- a/inventory-generation/identity-management/queue/user-management.yml +++ b/inventory-generation/identity-management/queue/user-management.yml @@ -4,13 +4,15 @@ include_vars: file: "{{ job.path }}" -- name: "Add User to removal queue" +- name: Set fact with user information set_fact: - users_remove: "{{ (users_remove | default([])) + [ user_info ] }}" - vars: user_info: first_name: "{{ first_name | trim }}" last_name: "{{ last_name | trim }}" email: "{{ email | trim }}" user_name: "{{ email.split('@')[0] | trim }}" state: "absent" + +- name: "Add User to removal queue" + set_fact: + users_remove: "{{ (users_remove | default([])) + [ user_info ] }}"