Files
windows-ansible/ansible/roles/win_study/tasks/delete.yml
T
2024-06-07 11:47:47 +01:00

24 lines
681 B
YAML

---
- name: Delete Study
block:
- name: Remove study folder
win_file:
path: "{{ study_folder }}"
state: absent
- name: Delete study folders on T drive
ansible.windows.win_file:
path: "T:\\{{ item }}\\{{ study_code }}"
state: absent
with_items: ["Import", "Export"]
- name: Delete AD group
community.windows.win_domain_group:
name: "{{ study_code }}"
description: "{{ study_code }} study"
path: "ou=Project Groups,dc={{ win_project }},dc=loc"
scope: domainlocal
category: security
state: absent
delegate_to: "{{ os_project }}-{{ win_project }}-dc01"