25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

182 satır
6.4KB

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