Delete study

This commit is contained in:
abrown38 committed 2024-06-07 11:47:47 +01:00
1 parent c65be7e4e9
commit 30f1ad68ca
3 files changed
+34 -3

No files matched your search

@@ -0,0 +1 @@
study_action: create
+23
View File
@@ -0,0 +1,23 @@
---
- 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"
+10 -3
View File
@@ -1,4 +1,11 @@
---
- import_tasks: check.yml
- import_tasks: create.yml
- import_tasks: permissions.yml
- name: Study Creation
include_tasks: "{{ create_task }}"
loop: [check.yml, create.yml, permissions.yml]
loop_control:
loop_var: create_task
when: study_action == 'create'
- name: Study Deletion
include_tasks: delete.yml
when: study_action == 'delete'