Compare commits
3 Commits
406db38296
...
c9a15dfccf
Author | SHA1 | Date | |
---|---|---|---|
c9a15dfccf | |||
f83a9ebd67 | |||
e16868a78d |
@ -73,7 +73,6 @@ debian11:
|
||||
- openssh-server
|
||||
- python3
|
||||
- sudo
|
||||
- systemd-zram-generator
|
||||
- xfsprogs
|
||||
|
||||
extra:
|
||||
@ -178,7 +177,6 @@ rhel8:
|
||||
- shim
|
||||
- telnet
|
||||
- vim
|
||||
- zram-generator
|
||||
- zstd
|
||||
|
||||
rhel9:
|
||||
|
@ -1,11 +1,4 @@
|
||||
---
|
||||
- name: Unmount /mnt recursively
|
||||
when: os not in ['rhel8', 'rhel9']
|
||||
become: false
|
||||
ansible.builtin.command: umount -l /mnt
|
||||
changed_when: result.rc == 0
|
||||
register: result
|
||||
|
||||
- name: Setup Cleanup
|
||||
when: hypervisor == "proxmox"
|
||||
delegate_to: localhost
|
||||
|
@ -202,6 +202,7 @@
|
||||
mode: '0644'
|
||||
|
||||
- name: Create zram config
|
||||
when: os not in ['debian11', 'rhel8']
|
||||
ansible.builtin.copy:
|
||||
dest: /mnt/etc/systemd/zram-generator.conf
|
||||
content: |
|
||||
|
@ -43,15 +43,43 @@
|
||||
size: "{{ item.size }}"
|
||||
state: present
|
||||
loop:
|
||||
- { lv: root, size: "{{ [(vm_size | float) - 0.5 - (((vm_memory | float / 1024) >= 16.0)
|
||||
| ternary((vm_memory | float / 1024 / 2) | int, 4)) - 7.5, 1] | max | float
|
||||
| round(1) | string + 'G' }}" }
|
||||
- { lv: swap, size: "{{ ((vm_memory | float / 1024 >= 16.0) | ternary((vm_memory | float / 2048)
|
||||
| int, [vm_memory | float / 1024, 4.0] | max)) | string + 'G' }}" }
|
||||
- { lv: home, size: "2G" }
|
||||
- { lv: var, size: "2G" }
|
||||
- { lv: var_log, size: "2G" }
|
||||
- { lv: var_log_audit, size: "1.5G" }
|
||||
- lv: root
|
||||
size: >-
|
||||
{{ ((cis | lower == 'true') | ternary(
|
||||
(((vm_size | float - ((vm_memory | float / 1024 >= 16.0) | ternary(
|
||||
(vm_memory | float / 2048) | int,
|
||||
[vm_memory | float / 1024, 4.0] | max
|
||||
)) - 0.5 - 7.5) > 12.0) | ternary(
|
||||
(vm_size | float * 0.4) | round(0, 'ceil'),
|
||||
vm_size | float - ((vm_memory | float / 1024 >= 16.0) | ternary(
|
||||
(vm_memory | float / 2048) | int,
|
||||
[vm_memory | float / 1024, 4.0] | max
|
||||
)) - 0.5 - 7.5
|
||||
)),
|
||||
vm_size | float - ((vm_memory | float / 1024 >= 16.0) | ternary(
|
||||
(vm_memory | float / 2048) | int,
|
||||
[vm_memory | float / 1024, 4.0] | max
|
||||
)) - 0.5
|
||||
)) | string + 'G' }}
|
||||
|
||||
- lv: swap
|
||||
size: >-
|
||||
{{ ((vm_memory | float / 1024 >= 16.0) | ternary(
|
||||
(vm_memory | float / 2048) | int,
|
||||
[vm_memory | float / 1024, 4.0] | max
|
||||
)) | string + 'G' }}
|
||||
|
||||
- lv: home
|
||||
size: "2G"
|
||||
|
||||
- lv: var
|
||||
size: "2G"
|
||||
|
||||
- lv: var_log
|
||||
size: "2G"
|
||||
|
||||
- lv: var_log_audit
|
||||
size: "1.5G"
|
||||
|
||||
- name: Create filesystems
|
||||
block:
|
||||
|
Loading…
Reference in New Issue
Block a user