cleanserver.yml 473 Bytes
---
- hosts: FormatAppDisk
  become: true
  tasks:
 #   - name: Unmount
 #     mount:
 #       src: "{{ app_disk }}"
 #       state: unmounted
    # Read device information (always use unit when probing)
    - parted: device="{{ app_disk }}" unit=MiB
      register: sdb_info
# Remove all partitions from disk
 #   - parted:
 #       device: "{{ app_disk }}"
 #       number: "{{ item.num }}"
 #       state: absent
 #     with_items:
 #       - "{{ sdb_info.partitions }}"