Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

223 linhas
7.2KB

  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. debian_base_packages: "{{ debian_base_packages }}"
  12. debian_boot_packages: "{{ _debian_boot_packages[partitioning_profile] }}"
  13. debian_base_packages:
  14. - linux-image-amd64
  15. - busybox-static
  16. - openssh-server
  17. - python
  18. - console-setup
  19. - acpi-support
  20. - bridge-utils
  21. _debian_boot_packages:
  22. efi-dmcrypt-lvm:
  23. - busybox-static
  24. - lvm2
  25. - cryptsetup
  26. - btrfs-tools
  27. - grub-efi-amd64
  28. - efibootmgr
  29. efi-mdraid-lvm:
  30. - busybox-static
  31. - mdadm
  32. - lvm2
  33. - btrfs-tools
  34. - grub-efi-amd64
  35. - efibootmgr
  36. bios-mbr-dmcrypt-lvm:
  37. - busybox-static
  38. - lvm2
  39. - cryptsetup
  40. - btrfs-tools
  41. - grub-pc
  42. bios-gpt-mdraid-lvm:
  43. - busybox-static
  44. - mdadm
  45. - lvm2
  46. - btrfs-tools
  47. - grub-pc
  48. _label_type:
  49. efi-mdraid-lvm: gpt
  50. efi-dmcrypt-lvm: gpt
  51. bios-mbr-dmcrypt-lvm: msdos
  52. bios-gpt-mdraid-lvm: gpt
  53. _dmcrypt_device_name: "{{inventory_hostname_short}}-crypt0"
  54. _volume_group_name: "{{inventory_hostname_short}}-vg0"
  55. _select_partlabel: "{{inventory_hostname_short}}-select"
  56. _efi_partlabel: "{{inventory_hostname_short}}-efi"
  57. _mdraid_devices:
  58. bios-mbr-dmcrypt-lvm: []
  59. efi-dmcrypt-lvm: []
  60. bios-gpt-mdraid-lvm:
  61. - device: /dev/md/vg0
  62. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  63. - device: /dev/md/boot
  64. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  65. - device: /dev/md/rescue
  66. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  67. efi-mdraid-lvm:
  68. - device: /dev/md/vg0
  69. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  70. - device: /dev/md/boot
  71. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  72. - device: /dev/md/rescue
  73. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  74. _dmcrypt_devices:
  75. efi-mdraid-lvm: []
  76. bios-gpt-mdraid-lvm: []
  77. efi-dmcrypt-lvm:
  78. - device: "{{ _crypt_device[partitioning_profile] }}"
  79. name: "{{inventory_hostname}}-crypt0"
  80. cipher: aes-xts-plain64
  81. hash: sha512
  82. key_size: 512
  83. _crypt_device:
  84. #bios-dmcrypt-lvm: "{{ hard_disk_device }}-part4"
  85. efi-dmcrypt-lvm: /dev/disk/by-partlabel/{{inventory_hostname}}-crypt
  86. _volume_groups:
  87. bios-mbr-dmcrypt-lvm:
  88. - name: "{{_volume_group_name}}"
  89. devices:
  90. - /dev/mapper/{{_dmcrypt_device_name}}
  91. efi-dmcrypt-lvm:
  92. - name: "{{_volume_group_name}}"
  93. devices:
  94. - /dev/mapper/{{_dmcrypt_device_name}}
  95. bios-gpt-mdraid-lvm:
  96. - name: "{{_volume_group_name}}"
  97. devices:
  98. - /dev/md/vg0
  99. efi-mdraid-lvm:
  100. - name: "{{_volume_group_name}}"
  101. devices:
  102. - /dev/md/vg0
  103. _logical_volumes_default:
  104. - name: root
  105. size: 32G
  106. volume_group: "{{_volume_group_name}}"
  107. - name: swap
  108. size: 2G
  109. volume_group: "{{_volume_group_name}}"
  110. #- name: home
  111. # size: 100%FREE
  112. # volume_group: vg
  113. _logical_volumes:
  114. bios-mbr-dmcrypt-lvm: "{{_logical_volumes_default}}"
  115. efi-dmcrypt-lvm: "{{_logical_volumes_default}}"
  116. bios-gpt-mdraid-lvm: "{{_logical_volumes_default}}"
  117. efi-mdraid-lvm: "{{_logical_volumes_default}}"
  118. _fs_uuid_root: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' root') }}"
  119. _fs_uuid_boot: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' boot') }}"
  120. _fs_uuid_rescue: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' rescue') }}"
  121. _fs_uuid_select: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' select') }}"
  122. _fs_uuid_swap: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' swap') }}"
  123. _filesystems:
  124. #bios-mbr-dmcrypt-lvm:
  125. # - device: /dev/vg/root
  126. # mount_point: /
  127. # fstype: btrfs
  128. # uuid: "{{ _fs_uuid_root }}"
  129. # - device: "{{ hard_disk_device }}-part2"
  130. # mount_point: /boot
  131. # fstype: btrfs
  132. # uuid: "{{ _fs_uuid_boot }}"
  133. # - device: "{{ hard_disk_device }}-part3"
  134. # mount_point: /boot/rescue
  135. # fstype: btrfs
  136. # uuid: "{{ _fs_uuid_rescue }}"
  137. # - device: "{{ hard_disk_device }}-part1"
  138. # mount_point: /boot/select
  139. # fstype: btrfs
  140. # uuid: "{{ _fs_uuid_select }}"
  141. efi-dmcrypt-lvm:
  142. - device: /dev/{{_volume_group_name}}/root
  143. mount_point: /
  144. fstype: btrfs
  145. uuid: "{{ _fs_uuid_root }}"
  146. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-boot
  147. mount_point: /boot
  148. fstype: btrfs
  149. uuid: "{{ _fs_uuid_boot }}"
  150. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-rescue
  151. mount_point: /boot/rescue
  152. fstype: btrfs
  153. uuid: "{{ _fs_uuid_rescue }}"
  154. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-select
  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. bios-gpt-mdraid-lvm:
  162. - device: /dev/{{_volume_group_name}}/root
  163. mount_point: /
  164. fstype: btrfs
  165. uuid: "{{ _fs_uuid_root }}"
  166. - device: /dev/md/boot
  167. mount_point: /boot
  168. fstype: btrfs
  169. uuid: "{{ _fs_uuid_boot }}"
  170. - device: /dev/md/rescue
  171. mount_point: /boot/rescue
  172. fstype: btrfs
  173. uuid: "{{ _fs_uuid_rescue }}"
  174. - device: /dev/disk/by-partlabel/{{_select_partlabel}}
  175. mount_point: /boot/select
  176. fstype: btrfs
  177. uuid: "{{ _fs_uuid_select }}"
  178. efi-mdraid-lvm:
  179. - device: /dev/{{_volume_group_name}}/root
  180. mount_point: /
  181. fstype: btrfs
  182. uuid: "{{ _fs_uuid_root }}"
  183. - device: /dev/md/boot
  184. mount_point: /boot
  185. fstype: btrfs
  186. uuid: "{{ _fs_uuid_boot }}"
  187. - device: /dev/md/rescue
  188. mount_point: /boot/rescue
  189. fstype: btrfs
  190. uuid: "{{ _fs_uuid_rescue }}"
  191. - device: /dev/disk/by-partlabel/{{_select_partlabel}}
  192. mount_point: /boot/select
  193. fstype: btrfs
  194. uuid: "{{ _fs_uuid_select }}"
  195. - device: /dev/disk/by-partlabel/{{_efi_partlabel}}
  196. mount_point: /boot/efi
  197. fstype: vfat
  198. _swap_devices:
  199. bios-mbr-dmcrypt-lvm:
  200. - device: /dev/{{_volume_group_name}}/swap
  201. uuid: "{{ _fs_uuid_swap }}"
  202. efi-dmcrypt-lvm:
  203. - device: /dev/{{_volume_group_name}}/swap
  204. uuid: "{{ _fs_uuid_swap }}"
  205. bios-gpt-mdraid-lvm:
  206. - device: /dev/{{_volume_group_name}}/swap
  207. uuid: "{{ _fs_uuid_swap }}"
  208. efi-mdraid-lvm:
  209. - device: /dev/{{_volume_group_name}}/swap
  210. uuid: "{{ _fs_uuid_swap }}"