mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 11:07:21 +00:00
Delete study
This commit is contained in:
1 parent
c65be7e4e9
commit
30f1ad68ca
3 files changed
+34
-3
No files matched your search
@@ -0,0 +1 @@
|
||||
study_action: create
|
||||
@@ -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"
|
||||
@@ -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'
|
||||
Reference in new issue
Block a user