-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.yml
More file actions
36 lines (31 loc) · 994 Bytes
/
delete.yml
File metadata and controls
36 lines (31 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: 'Setup local partitioning for a RAID encrypted Ubuntu install'
hosts: localhost
connection: local
handlers:
- name: 'reload udev'
command: 'udevadm settle'
- name: 'reload systemd'
systemd:
daemon_reload: true
vars_files:
- 'vars/main.yml'
tasks:
- name: 'Include LUKS devices deletion logic'
include_tasks: 'tasks/delete_luks_device.yml'
loop: "{{ luks_devices }}"
loop_control:
loop_var: _luks_device
- name: 'Remove existing arrays'
include_tasks: 'tasks/delete_array.yml'
when: ansible_facts['devices'][_array['name']] is defined
loop: "{{ raid_arrays }}"
loop_control:
loop_var: _array
- name: 'Flush handlers to inform the kernel of the new partitions'
meta: 'flush_handlers'
- name: 'Include disk partition erasure logic'
include_tasks: 'tasks/delete_disk_partitions.yml'
loop: "{{ disks }}"
loop_control:
loop_var: _disk