|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- [
- {#
- {% if not hard_disks is defined %}
- {% for device in ansible_devices.keys() %}
- {% set name = device %}
- {% set device = '/dev/' + device %}
- {% endif %}
- #}
- {% for hd in hard_disks %}
- {% set first_device = (hard_disks | first) == hd %}
- {% set name = hd.name %}
- {% set device = hd.device %}
- {
- "device": "{{device}}",
- "name": "{{name}}",
- "label_type": "{{ _label_type[partitioning_profile] }}",
- "partitions":
- [
- {% set partition_name_prefix = inventory_hostname_short + '-' + name %}
- {% if partitioning_profile == "bios-mbr-dmcrypt-lvm" %}
- {
- "part_type": "primary",
- "fs_type": "btrfs",
- "start": "768MiB",
- "end": "1GiB"
- }
- {
- "part_type": "primary",
- "fs_type": "btrfs",
- "start": "1GiB",
- "end": "2GiB"
- }
- {
- "part_type": "primary",
- "fs_type": "btrfs",
- "start": "2GiB",
- "end": "6GiB"
- }
- {
- "part_type": "primary",
- "start": "6GiB",
- "end": "{{ partitioning_profile_last_partition_end }}"
- }
- {% endif %}
- {% if partitioning_profile == "efi-dmcrypt-lvm" %}
- {
- "part_type": "ESP",
- "start": "256MiB",
- "end": "768MiB"
- },
- {
- "name": "select",
- "start": "768MiB",
- "end": "1GiB"
- },
- {
- "name": "{{partition_name_prefix}}-boot",
- "typecode": "8300",
- "start": "1GiB",
- "end": "2GiB"
- },
- {
- "name": "{{partition_name_prefix}}-rescue",
- "typecode": "8300",
- "start": "2GiB",
- "end": "6GiB"
- },
- {
- "name": "{{partition_name_prefix}}-crypt",
- "typecode": "8300",
- "start": "6GiB",
- "end": "{{ partitioning_profile_last_partition_end }}"
- }
- {% endif %}
- {% if partitioning_profile == "bios-gpt-mdraid-lvm" %}
- {
- "name": "bios_boot",
- "start": "2MiB",
- "end": "4MiB",
- "flags": ["bios_grub"]
- },
- {% if first_device %}
- {
- "name": "{{_select_partlabel}}",
- "start": "768MiB",
- "end": "1GiB"
- },
- {% endif %}
- {
- "name": "{{partition_name_prefix}}-boot-md",
- "start": "1GiB",
- "end": "2GiB",
- "mdraid": "boot"
- },
- {
- "name": "{{partition_name_prefix}}-rescue-md",
- "start": "2GiB",
- "end": "6GiB",
- "mdraid": "rescue"
- },
- {
- "name": "{{partition_name_prefix}}-vg0-md",
- "start": "6GiB",
- "end": "{{ partitioning_profile_last_partition_end }}",
- "mdraid": "vg0"
- }
- {% endif %}
- {% if partitioning_profile == "efi-mdraid-lvm" %}
- {% if first_device %}
- {
- "name": "{{_efi_partlabel}}",
- "start": "256MiB",
- "end": "768MiB",
- "flags": ["boot"]
- },
- {
- "name": "{{_select_partlabel}}",
- "start": "768MiB",
- "end": "1GiB"
- },
- {% endif %}
- {
- "name": "{{partition_name_prefix}}-boot-md",
- "start": "1GiB",
- "end": "2GiB",
- "mdraid": "boot"
- },
- {
- "name": "{{partition_name_prefix}}-rescue-md",
- "start": "2GiB",
- "end": "6GiB",
- "mdraid": "rescue"
- },
- {
- "name": "{{partition_name_prefix}}-vg0-md",
- "start": "6GiB",
- "end": "{{ partitioning_profile_last_partition_end }}",
- "mdraid": "vg0"
- }
- {% endif %}
- ]
- },
- {% endfor %}
- ]
|