Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

184 строки
6.4KB

  1. _host_vars_filename: partitioning
  2. _host_vars_default: {}
  3. _host_vars:
  4. hard_disks: "{{ hard_disks }}"
  5. mdraid_devices: "{{ _mdraid_devices[partitioning_profile] }}"
  6. dmcrypt_devices: "{{ _dmcrypt_devices[partitioning_profile] }}"
  7. volume_groups: "{{ _volume_groups[partitioning_profile] }}"
  8. logical_volumes: "{{ _logical_volumes[partitioning_profile] }}"
  9. filesystems: "{{ _filesystems[partitioning_profile] }}"
  10. swap_devices: "{{ _swap_devices[partitioning_profile] }}"
  11. _label_type:
  12. efi-mdraid-lvm: gpt
  13. efi-dmcrypt-lvm: gpt
  14. bios-mbr-dmcrypt-lvm: msdos
  15. bios-gpt-mdraid-lvm: gpt
  16. _dmcrypt_device_name: "{{inventory_hostname_short}}-crypt0"
  17. _volume_group_name: "{{inventory_hostname_short}}-vg0"
  18. _select_partlabel: "{{inventory_hostname_short}}-select"
  19. _efi_partlabel: "{{inventory_hostname_short}}-efi"
  20. _mdraid_devices:
  21. bios-mbr-dmcrypt-lvm: []
  22. efi-dmcrypt-lvm: []
  23. bios-gpt-mdraid-lvm:
  24. - device: /dev/md/vg0
  25. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  26. - device: /dev/md/boot
  27. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  28. - device: /dev/md/rescue
  29. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  30. efi-mdraid-lvm:
  31. - device: /dev/md/vg0
  32. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  33. - device: /dev/md/boot
  34. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  35. - device: /dev/md/rescue
  36. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  37. _dmcrypt_devices:
  38. efi-mdraid-lvm: []
  39. bios-gpt-mdraid-lvm: []
  40. efi-dmcrypt-lvm:
  41. - device: "{{ _crypt_device[partitioning_profile] }}"
  42. name: "{{inventory_hostname}}-crypt0"
  43. cipher: aes-xts-plain64
  44. hash: sha512
  45. key_size: 512
  46. _crypt_device:
  47. #bios-dmcrypt-lvm: "{{ hard_disk_device }}-part4"
  48. efi-dmcrypt-lvm: /dev/disk/by-partlabel/{{inventory_hostname}}-crypt
  49. _volume_groups:
  50. bios-mbr-dmcrypt-lvm:
  51. - name: "{{_volume_group_name}}"
  52. devices:
  53. - /dev/mapper/{{_dmcrypt_device_name}}
  54. efi-dmcrypt-lvm:
  55. - name: "{{_volume_group_name}}"
  56. devices:
  57. - /dev/mapper/{{_dmcrypt_device_name}}
  58. bios-gpt-mdraid-lvm:
  59. - name: "{{_volume_group_name}}"
  60. devices:
  61. - /dev/md/vg0
  62. efi-mdraid-lvm:
  63. - name: "{{_volume_group_name}}"
  64. devices:
  65. - /dev/md/vg0
  66. _logical_volumes_default:
  67. - name: root
  68. size: 32G
  69. volume_group: "{{_volume_group_name}}"
  70. - name: swap
  71. size: 2G
  72. volume_group: "{{_volume_group_name}}"
  73. #- name: home
  74. # size: 100%FREE
  75. # volume_group: vg
  76. _logical_volumes:
  77. bios-mbr-dmcrypt-lvm: "{{_logical_volumes_default}}"
  78. efi-dmcrypt-lvm: "{{_logical_volumes_default}}"
  79. bios-gpt-mdraid-lvm: "{{_logical_volumes_default}}"
  80. efi-mdraid-lvm: "{{_logical_volumes_default}}"
  81. _fs_uuid_root: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' root') }}"
  82. _fs_uuid_boot: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' boot') }}"
  83. _fs_uuid_rescue: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' rescue') }}"
  84. _fs_uuid_select: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' select') }}"
  85. _fs_uuid_swap: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' swap') }}"
  86. _filesystems:
  87. #bios-mbr-dmcrypt-lvm:
  88. # - device: /dev/vg/root
  89. # mount_point: /
  90. # fstype: btrfs
  91. # uuid: "{{ _fs_uuid_root }}"
  92. # - device: "{{ hard_disk_device }}-part2"
  93. # mount_point: /boot
  94. # fstype: btrfs
  95. # uuid: "{{ _fs_uuid_boot }}"
  96. # - device: "{{ hard_disk_device }}-part3"
  97. # mount_point: /boot/rescue
  98. # fstype: btrfs
  99. # uuid: "{{ _fs_uuid_rescue }}"
  100. # - device: "{{ hard_disk_device }}-part1"
  101. # mount_point: /boot/select
  102. # fstype: btrfs
  103. # uuid: "{{ _fs_uuid_select }}"
  104. efi-dmcrypt-lvm:
  105. - device: /dev/{{_volume_group_name}}/root
  106. mount_point: /
  107. fstype: btrfs
  108. uuid: "{{ _fs_uuid_root }}"
  109. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-boot
  110. mount_point: /boot
  111. fstype: btrfs
  112. uuid: "{{ _fs_uuid_boot }}"
  113. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-rescue
  114. mount_point: /boot/rescue
  115. fstype: btrfs
  116. uuid: "{{ _fs_uuid_rescue }}"
  117. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-select
  118. mount_point: /boot/select
  119. fstype: btrfs
  120. uuid: "{{ _fs_uuid_select }}"
  121. - device: /dev/disk/by-partlabel/{{_efi_partlabel}}
  122. mount_point: /boot/efi
  123. fstype: vfat
  124. bios-gpt-mdraid-lvm:
  125. - device: /dev/{{_volume_group_name}}/root
  126. mount_point: /
  127. fstype: btrfs
  128. uuid: "{{ _fs_uuid_root }}"
  129. - device: /dev/md/boot
  130. mount_point: /boot
  131. fstype: btrfs
  132. uuid: "{{ _fs_uuid_boot }}"
  133. - device: /dev/md/rescue
  134. mount_point: /boot/rescue
  135. fstype: btrfs
  136. uuid: "{{ _fs_uuid_rescue }}"
  137. - device: /dev/disk/by-partlabel/{{_select_partlabel}}
  138. mount_point: /boot/select
  139. fstype: btrfs
  140. uuid: "{{ _fs_uuid_select }}"
  141. efi-mdraid-lvm:
  142. - device: /dev/{{_volume_group_name}}/root
  143. mount_point: /
  144. fstype: btrfs
  145. uuid: "{{ _fs_uuid_root }}"
  146. - device: /dev/md/boot
  147. mount_point: /boot
  148. fstype: btrfs
  149. uuid: "{{ _fs_uuid_boot }}"
  150. - device: /dev/md/rescue
  151. mount_point: /boot/rescue
  152. fstype: btrfs
  153. uuid: "{{ _fs_uuid_rescue }}"
  154. - device: /dev/disk/by-partlabel/{{_select_partlabel}}
  155. mount_point: /boot/select
  156. fstype: btrfs
  157. uuid: "{{ _fs_uuid_select }}"
  158. - device: /dev/disk/by-partlabel/{{_efi_partlabel}}
  159. mount_point: /boot/efi
  160. fstype: vfat
  161. _swap_devices:
  162. bios-mbr-dmcrypt-lvm:
  163. - device: /dev/{{_volume_group_name}}/swap
  164. uuid: "{{ _fs_uuid_swap }}"
  165. efi-dmcrypt-lvm:
  166. - device: /dev/{{_volume_group_name}}/swap
  167. uuid: "{{ _fs_uuid_swap }}"
  168. bios-gpt-mdraid-lvm:
  169. - device: /dev/{{_volume_group_name}}/swap
  170. uuid: "{{ _fs_uuid_swap }}"
  171. efi-mdraid-lvm:
  172. - device: /dev/{{_volume_group_name}}/swap
  173. uuid: "{{ _fs_uuid_swap }}"