25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- ---
-
- - name: set default partitions
- set_fact:
- hard_disks: "{{ _hard_disks }}"
-
- - name: clear all partition table informations from disks
- command:
- sgdisk
- --clear
- {{ item.device }}
- with_items: "{{ hard_disks }}"
-
- - name: create new partition table information
- command:
- sgdisk
- "--new={{ item.1.partnum }}:{{ item.1.start }}:{{ item.1.end }}"
- "--change-name={{ item.1.partnum }}:{{ item.1.name }}"
- "--typecode={{ item.1.partnum }}:{{ item.1.typecode }}"
- {{ item.0.device }}
- with_subelements:
- - "{{ hard_disks }}"
- - partitions
-
- - name: sync
- command: sync
-
- - name: reread partition tables
- command: hdparm -z {{ item.device }}
- with_items: "{{ hard_disks }}"
|