Add swap optimalisations
This commit is contained in:
parent
2c4995ede8
commit
f967ea1c3b
@ -166,18 +166,32 @@
|
|||||||
|
|
||||||
- name: Extra Configuration
|
- name: Extra Configuration
|
||||||
block:
|
block:
|
||||||
- name: Append lines to vimrc
|
- name: Append vim configurations to vimrc
|
||||||
failed_when: false
|
failed_when: false
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: "{{ '/mnt/etc/vim/vimrc' if os | lower in ['debian11', 'debian12', 'ubuntu', 'ubuntu-lts'] else '/mnt/etc/vimrc' }}"
|
path: "{{ '/mnt/etc/vim/vimrc' if os | lower in ['debian11', 'debian12', 'ubuntu', 'ubuntu-lts']
|
||||||
line: "{{ item }}"
|
else '/mnt/etc/vimrc' }}"
|
||||||
|
block: |
|
||||||
|
set encoding=utf-8
|
||||||
|
set number
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set mouse=a
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
with_items:
|
marker: ""
|
||||||
- set encoding=utf-8
|
|
||||||
- set number
|
- name: Add memory tuning parameters
|
||||||
- set autoindent
|
ansible.builtin.blockinfile:
|
||||||
- set smartindent
|
path: /mnt/etc/sysctl.d/90-memory.conf
|
||||||
- set mouse=a
|
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: ""
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: Copy FirstRun Script
|
- name: Copy FirstRun Script
|
||||||
when: os | lower != "archlinux"
|
when: os | lower != "archlinux"
|
||||||
|
Loading…
Reference in New Issue
Block a user