mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 13:07:21 +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
+12
-2
@@ -11,7 +11,7 @@
|
||||
groups:
|
||||
add:
|
||||
- "{{ study_code }}"
|
||||
- Remote Desktop Users
|
||||
- "{{ guacamole_user_group }}"
|
||||
email: "{{ email }}"
|
||||
attributes:
|
||||
add:
|
||||
@@ -20,4 +20,14 @@
|
||||
password_expired: true
|
||||
state: present
|
||||
|
||||
- import_tasks: exporter.yml # referece exporter so modify can be more general purpose
|
||||
- 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