--- - name: Append vim configurations to vimrc ansible.builtin.blockinfile: path: "{{ '/mnt/etc/vim/vimrc' if is_debian | bool else '/mnt/etc/vimrc' }}" block: | set encoding=utf-8 set number set autoindent set smartindent set mouse=a insertafter: EOF marker: "# {mark} CUSTOM VIM CONFIG" failed_when: false - name: Add memory tuning parameters ansible.builtin.blockinfile: path: /mnt/etc/sysctl.d/90-memory.conf create: true block: | vm.swappiness=10 vm.vfs_cache_pressure=50 vm.dirty_background_ratio=1 vm.dirty_ratio=10 vm.page-cluster=10 marker: "# {mark} MEMORY TUNING" mode: "0644" - name: Create zram config when: - (os != "debian" or (os_version | string) != "11") and os != "rhel" - os not in ["alpine", "void"] - system_cfg.features.swap.enabled | bool ansible.builtin.copy: dest: /mnt/etc/systemd/zram-generator.conf content: | [zram0] zram-size = ram / 2 compression-algorithm = {{ 'zstd' if system_cfg.features.zstd.enabled | bool else 'lz4' }} swap-priority = 100 fs-type = swap mode: "0644" - name: Copy Custom Shell config ansible.builtin.template: src: custom.sh.j2 dest: /mnt/etc/profile.d/custom.sh mode: "0644"