mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-11-01 20:40:15 +00:00
Remove users that fail during creation to prevent assert step failing on reruns
This commit is contained in:
1 parent
d5a45cd531
commit
56f19b86fe
1 file changed
+11
-1
@@ -11,7 +11,7 @@
|
||||
groups:
|
||||
add:
|
||||
- "{{ study_code }}"
|
||||
- Remote Desktop Users
|
||||
- "{{ guacamole_user_group }}"
|
||||
email: "{{ email }}"
|
||||
attributes:
|
||||
add:
|
||||
@@ -21,3 +21,13 @@
|
||||
state: present
|
||||
|
||||
- import_tasks: exporter.yml # referece exporter so modify can be more general purpose
|
||||
|
||||
rescue:
|
||||
- name: Removing failed User
|
||||
microsoft.ad.user:
|
||||
name: "{{ username }}"
|
||||
path: ou=Project Users,dc={{ win_project }},dc=loc
|
||||
state: absent
|
||||
|
||||
- name: Trigger Failure
|
||||
ansible.builtin.fail:
|
||||
Reference in new issue
Block a user