-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Default to __meta__ var names - Use true for boolean - 🤦 Undo incorrect variable change - Build user_remove list individually - Standardize on using 'identities' var
- Loading branch information
MAHDTech
authored
Oct 18, 2021
1 parent
316a292
commit 84298f5
Showing
5 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
21 changes: 9 additions & 12 deletions
21
inventory-generation/identity-management/queue/user-management.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
--- | ||
|
||
- name: "Read User Management Job: {{ job.path | basename }}" | ||
include_vars: | ||
file: "{{ job.path }}" | ||
|
||
- name: "Display User Management Job Details" | ||
debug: | ||
msg: | ||
- "Adding the follow user details to the removal list" | ||
- "User ID: {{ uuid }}" | ||
- "First Name: {{ first_name }}" | ||
- "Last Name: {{ last_name }}" | ||
- "Email: {{ email }}" | ||
- "Role: {{ role }}" | ||
- "State: absent" | ||
|
||
- name: "Add User to removal queue" | ||
set_fact: | ||
users_remove: "{{ (users_remove | default([])) + [ { 'first_name': (first_name | trim), 'last_name': (last_name | trim), 'email': (email | trim) , 'user_name': (email.split('@')[0] | trim), 'state': 'absent' } ] }}" | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters