|
|
@@ -1,133 +1,146 @@ |
|
|
|
_host_vars_filename: partitions |
|
|
|
_host_vars_filename: partitioning |
|
|
|
_host_vars: |
|
|
|
hard_disks: "{{ hard_disks }}" |
|
|
|
mdraid_devices: "{{ mdraid_devices }}" |
|
|
|
dmcrypt_devices: "{{ dmcrypt_devices }}" |
|
|
|
volume_groups: "{{ volume_groups }}" |
|
|
|
logical_volumes: "{{ logical_volumes }}" |
|
|
|
filesystems: "{{ filesystems }}" |
|
|
|
|
|
|
|
|
|
|
|
filesystem_uuid_namespace: "{{ lookup('pipe','uuid -v4') }}" |
|
|
|
|
|
|
|
_fs_uuid_root: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' root') }}" |
|
|
|
_fs_uuid_boot: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' boot') }}" |
|
|
|
_fs_uuid_rescue: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' rescue') }}" |
|
|
|
_fs_uuid_select: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' select') }}" |
|
|
|
|
|
|
|
hard_disks: |
|
|
|
- device: "{{ hard_disk_device }}" |
|
|
|
label_type: "{{ _label_type[installation_profile] }}" |
|
|
|
partitions: "{{ _partitions[installation_profile] }}" |
|
|
|
mdraid_devices: "{{ _mdraid_devices[partitioning_profile] }}" |
|
|
|
dmcrypt_devices: "{{ _dmcrypt_devices[partitioning_profile] }}" |
|
|
|
volume_groups: "{{ _volume_groups[partitioning_profile] }}" |
|
|
|
logical_volumes: "{{ _logical_volumes[partitioning_profile] }}" |
|
|
|
filesystems: "{{ _filesystems[partitioning_profile] }}" |
|
|
|
|
|
|
|
_label_type: |
|
|
|
bios: msdos |
|
|
|
efi: gpt |
|
|
|
efi-mdraid-lvm: gpt |
|
|
|
efi-dmcrypt-lvm: gpt |
|
|
|
bios-dmcrypt-lvm: msdos |
|
|
|
|
|
|
|
_partitions: |
|
|
|
bios: |
|
|
|
- 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: -1s |
|
|
|
efi: |
|
|
|
- part_type: ESP |
|
|
|
start: 256MiB |
|
|
|
end: 768MiB |
|
|
|
- name: select |
|
|
|
start: 768MiB |
|
|
|
end: 1GiB |
|
|
|
- name: "{{inventory_hostname}}-boot0" |
|
|
|
typecode: 8300 |
|
|
|
start: 1GiB |
|
|
|
end: 2GiB |
|
|
|
- name: "{{inventory_hostname}}-rescue0" |
|
|
|
typecode: 8300 |
|
|
|
start: 2GiB |
|
|
|
end: 6GiB |
|
|
|
- name: "{{inventory_hostname}}-crypt0" |
|
|
|
typecode: 8300 |
|
|
|
start: 6GiB |
|
|
|
end: -1s |
|
|
|
_dmcrypt_device_name: "{{inventory_hostname_short}}-crypt0" |
|
|
|
_volume_group_name: "{{inventory_hostname_short}}-vg0" |
|
|
|
_select_partlabel: "{{inventory_hostname_short}}-select" |
|
|
|
_efi_partlabel: "{{inventory_hostname_short}}-efi" |
|
|
|
|
|
|
|
mdraid_devices: [] |
|
|
|
_mdraid_devices: |
|
|
|
bios-dmcrypt-lvm: [] |
|
|
|
efi-dmcrypt-lvm: [] |
|
|
|
efi-mdraid-lvm: |
|
|
|
- device: /dev/md/vg0 |
|
|
|
devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}" |
|
|
|
- device: /dev/md/boot |
|
|
|
devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}" |
|
|
|
- device: /dev/md/rescue |
|
|
|
devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}" |
|
|
|
|
|
|
|
dmcrypt_devices: |
|
|
|
- device: "{{ _crypt_device[installation_profile] }}" |
|
|
|
name: "{{inventory_hostname}}-crypt0" |
|
|
|
cipher: aes-xts-plain64 |
|
|
|
hash: sha512 |
|
|
|
key_size: 512 |
|
|
|
_dmcrypt_devices: |
|
|
|
efi-mdraid-lvm: [] |
|
|
|
#- device: "{{ _crypt_device[partitioning_profile] }}" |
|
|
|
# name: "{{inventory_hostname}}-crypt0" |
|
|
|
# cipher: aes-xts-plain64 |
|
|
|
# hash: sha512 |
|
|
|
# key_size: 512 |
|
|
|
#_crypt_device: |
|
|
|
#bios-dmcrypt-lvm: "{{ hard_disk_device }}-part4" |
|
|
|
#efi-dmcrypt-lvm: /dev/disk/by-partlabel/{{inventory_hostname}}-crypt |
|
|
|
|
|
|
|
_crypt_device: |
|
|
|
bios: "{{ hard_disk_device }}-part4" |
|
|
|
efi: /dev/disk/by-partlabel/{{inventory_hostname}}-crypt |
|
|
|
|
|
|
|
volume_groups: |
|
|
|
- name: vg |
|
|
|
devices: |
|
|
|
- /dev/mapper/{{inventory_hostname}}-crypt0 |
|
|
|
_volume_groups: |
|
|
|
bios-dmcrypt-lvm: |
|
|
|
- name: "{{_volume_group_name}}" |
|
|
|
devices: |
|
|
|
- /dev/mapper/{{_dmcrypt_device_name}} |
|
|
|
efi-dmcrypt-lvm: |
|
|
|
- name: "{{_volume_group_name}}" |
|
|
|
devices: |
|
|
|
- /dev/mapper/{{_dmcrypt_device_name}} |
|
|
|
efi-mdraid-lvm: |
|
|
|
- name: "{{_volume_group_name}}" |
|
|
|
devices: |
|
|
|
- /dev/md/vg0 |
|
|
|
|
|
|
|
logical_volumes: |
|
|
|
- name: root |
|
|
|
size: 32G |
|
|
|
volume_group: vg |
|
|
|
- name: swap |
|
|
|
size: 1G |
|
|
|
volume_group: vg |
|
|
|
- name: home |
|
|
|
size: 100%FREE |
|
|
|
volume_group: vg |
|
|
|
_logical_volumes: |
|
|
|
bios-dmcrypt-lvm: |
|
|
|
- name: root |
|
|
|
size: 32G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
- name: swap |
|
|
|
size: 1G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
efi-dmcrypt-lvm: |
|
|
|
- name: root |
|
|
|
size: 32G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
- name: swap |
|
|
|
size: 1G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
efi-mdraid-lvm: |
|
|
|
- name: root |
|
|
|
size: 32G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
- name: swap |
|
|
|
size: 1G |
|
|
|
volume_group: "{{_volume_group_name}}" |
|
|
|
#- name: home |
|
|
|
# size: 100%FREE |
|
|
|
# volume_group: vg |
|
|
|
|
|
|
|
_fs_uuid_root: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' root') }}" |
|
|
|
_fs_uuid_boot: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' boot') }}" |
|
|
|
_fs_uuid_rescue: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' rescue') }}" |
|
|
|
_fs_uuid_select: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' select') }}" |
|
|
|
|
|
|
|
filesystems: "{{ _filesystems[installation_profile] }}" |
|
|
|
|
|
|
|
_filesystems: |
|
|
|
bios: |
|
|
|
- device: /dev/vg/root |
|
|
|
#bios-dmcrypt-lvm: |
|
|
|
# - device: /dev/vg/root |
|
|
|
# mount_point: / |
|
|
|
# fstype: btrfs |
|
|
|
# uuid: "{{ _fs_uuid_root }}" |
|
|
|
# - device: "{{ hard_disk_device }}-part2" |
|
|
|
# mount_point: /boot |
|
|
|
# fstype: btrfs |
|
|
|
# uuid: "{{ _fs_uuid_boot }}" |
|
|
|
# - device: "{{ hard_disk_device }}-part3" |
|
|
|
# mount_point: /boot/rescue |
|
|
|
# fstype: btrfs |
|
|
|
# uuid: "{{ _fs_uuid_rescue }}" |
|
|
|
# - device: "{{ hard_disk_device }}-part1" |
|
|
|
# mount_point: /boot/select |
|
|
|
# fstype: btrfs |
|
|
|
# uuid: "{{ _fs_uuid_select }}" |
|
|
|
efi-dmcrypt-lvm: |
|
|
|
- device: /dev/{{_volume_group_name}}/root |
|
|
|
mount_point: / |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_root }}" |
|
|
|
- device: "{{ hard_disk_device }}-part2" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-boot |
|
|
|
mount_point: /boot |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_boot }}" |
|
|
|
- device: "{{ hard_disk_device }}-part3" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-rescue |
|
|
|
mount_point: /boot/rescue |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_rescue }}" |
|
|
|
- device: "{{ hard_disk_device }}-part1" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-select |
|
|
|
mount_point: /boot/select |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_select }}" |
|
|
|
efi: |
|
|
|
- device: /dev/vg/root |
|
|
|
- device: /dev/disk/by-partlabel/{{_efi_partlabel}} |
|
|
|
mount_point: /boot/efi |
|
|
|
fstype: vfat |
|
|
|
efi-mdraid-lvm: |
|
|
|
- device: /dev/{{_volume_group_name}}/root |
|
|
|
mount_point: / |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_root }}" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-boot |
|
|
|
- device: /dev/md/boot |
|
|
|
mount_point: /boot |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_boot }}" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-rescue |
|
|
|
- device: /dev/md/rescue |
|
|
|
mount_point: /boot/rescue |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_rescue }}" |
|
|
|
- device: /dev/disk/by-partlabel/{{inventory_hostname}}-select |
|
|
|
- device: /dev/disk/by-partlabel/{{_select_partlabel}} |
|
|
|
mount_point: /boot/select |
|
|
|
fstype: btrfs |
|
|
|
uuid: "{{ _fs_uuid_select }}" |
|
|
|
- device: /dev/disk/by-partuuid/C12A7328-F81F-11D2-BA4B-00A0C93EC93B |
|
|
|
- device: /dev/disk/by-partlabel/{{_efi_partlabel}} |
|
|
|
mount_point: /boot/efi |
|
|
|
fstype: fat |
|
|
|
uuid: C12A7328-F81F-11D2-BA4B-00A0C93EC93B |
|
|
|
fstype: vfat |