No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

147 líneas
4.7KB

  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. _label_type:
  10. efi-mdraid-lvm: gpt
  11. efi-dmcrypt-lvm: gpt
  12. bios-dmcrypt-lvm: msdos
  13. _dmcrypt_device_name: "{{inventory_hostname_short}}-crypt0"
  14. _volume_group_name: "{{inventory_hostname_short}}-vg0"
  15. _select_partlabel: "{{inventory_hostname_short}}-select"
  16. _efi_partlabel: "{{inventory_hostname_short}}-efi"
  17. _mdraid_devices:
  18. bios-dmcrypt-lvm: []
  19. efi-dmcrypt-lvm: []
  20. efi-mdraid-lvm:
  21. - device: /dev/md/vg0
  22. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='vg0'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  23. - device: /dev/md/boot
  24. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='boot'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  25. - device: /dev/md/rescue
  26. devices: "{{ hard_disks | json_query(\"[].partitions[?mdraid=='rescue'][].name\") | map('regex_replace','(.*)','/dev/disk/by-partlabel/\\1') | list }}"
  27. _dmcrypt_devices:
  28. efi-mdraid-lvm: []
  29. #- device: "{{ _crypt_device[partitioning_profile] }}"
  30. # name: "{{inventory_hostname}}-crypt0"
  31. # cipher: aes-xts-plain64
  32. # hash: sha512
  33. # key_size: 512
  34. #_crypt_device:
  35. #bios-dmcrypt-lvm: "{{ hard_disk_device }}-part4"
  36. #efi-dmcrypt-lvm: /dev/disk/by-partlabel/{{inventory_hostname}}-crypt
  37. _volume_groups:
  38. bios-dmcrypt-lvm:
  39. - name: "{{_volume_group_name}}"
  40. devices:
  41. - /dev/mapper/{{_dmcrypt_device_name}}
  42. efi-dmcrypt-lvm:
  43. - name: "{{_volume_group_name}}"
  44. devices:
  45. - /dev/mapper/{{_dmcrypt_device_name}}
  46. efi-mdraid-lvm:
  47. - name: "{{_volume_group_name}}"
  48. devices:
  49. - /dev/md/vg0
  50. _logical_volumes:
  51. bios-dmcrypt-lvm:
  52. - name: root
  53. size: 32G
  54. volume_group: "{{_volume_group_name}}"
  55. - name: swap
  56. size: 1G
  57. volume_group: "{{_volume_group_name}}"
  58. efi-dmcrypt-lvm:
  59. - name: root
  60. size: 32G
  61. volume_group: "{{_volume_group_name}}"
  62. - name: swap
  63. size: 1G
  64. volume_group: "{{_volume_group_name}}"
  65. efi-mdraid-lvm:
  66. - name: root
  67. size: 32G
  68. volume_group: "{{_volume_group_name}}"
  69. - name: swap
  70. size: 1G
  71. volume_group: "{{_volume_group_name}}"
  72. #- name: home
  73. # size: 100%FREE
  74. # volume_group: vg
  75. _fs_uuid_root: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' root') }}"
  76. _fs_uuid_boot: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' boot') }}"
  77. _fs_uuid_rescue: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' rescue') }}"
  78. _fs_uuid_select: "{{ lookup('pipe','uuid -v5 '+filesystem_uuid_namespace+' select') }}"
  79. _filesystems:
  80. #bios-dmcrypt-lvm:
  81. # - device: /dev/vg/root
  82. # mount_point: /
  83. # fstype: btrfs
  84. # uuid: "{{ _fs_uuid_root }}"
  85. # - device: "{{ hard_disk_device }}-part2"
  86. # mount_point: /boot
  87. # fstype: btrfs
  88. # uuid: "{{ _fs_uuid_boot }}"
  89. # - device: "{{ hard_disk_device }}-part3"
  90. # mount_point: /boot/rescue
  91. # fstype: btrfs
  92. # uuid: "{{ _fs_uuid_rescue }}"
  93. # - device: "{{ hard_disk_device }}-part1"
  94. # mount_point: /boot/select
  95. # fstype: btrfs
  96. # uuid: "{{ _fs_uuid_select }}"
  97. efi-dmcrypt-lvm:
  98. - device: /dev/{{_volume_group_name}}/root
  99. mount_point: /
  100. fstype: btrfs
  101. uuid: "{{ _fs_uuid_root }}"
  102. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-boot
  103. mount_point: /boot
  104. fstype: btrfs
  105. uuid: "{{ _fs_uuid_boot }}"
  106. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-rescue
  107. mount_point: /boot/rescue
  108. fstype: btrfs
  109. uuid: "{{ _fs_uuid_rescue }}"
  110. - device: /dev/disk/by-partlabel/{{inventory_hostname}}-select
  111. mount_point: /boot/select
  112. fstype: btrfs
  113. uuid: "{{ _fs_uuid_select }}"
  114. - device: /dev/disk/by-partlabel/{{_efi_partlabel}}
  115. mount_point: /boot/efi
  116. fstype: vfat
  117. efi-mdraid-lvm:
  118. - device: /dev/{{_volume_group_name}}/root
  119. mount_point: /
  120. fstype: btrfs
  121. uuid: "{{ _fs_uuid_root }}"
  122. - device: /dev/md/boot
  123. mount_point: /boot
  124. fstype: btrfs
  125. uuid: "{{ _fs_uuid_boot }}"
  126. - device: /dev/md/rescue
  127. mount_point: /boot/rescue
  128. fstype: btrfs
  129. uuid: "{{ _fs_uuid_rescue }}"
  130. - device: /dev/disk/by-partlabel/{{_select_partlabel}}
  131. mount_point: /boot/select
  132. fstype: btrfs
  133. uuid: "{{ _fs_uuid_select }}"
  134. - device: /dev/disk/by-partlabel/{{_efi_partlabel}}
  135. mount_point: /boot/efi
  136. fstype: vfat