mirror of https://github.com/ceph/ceph-ansible.git
38 lines
982 B
YAML
38 lines
982 B
YAML
---
|
|
- name: disable osd directory parsing by updatedb
|
|
command: updatedb -e /var/lib/ceph
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: disable transparent hugepage
|
|
command: "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
|
|
changed_when: false
|
|
failed_when: false
|
|
when: disable_transparent_hugepage
|
|
|
|
- name: disable swap
|
|
command: swapoff -a
|
|
changed_when: false
|
|
failed_when: false
|
|
when: disable_swap
|
|
|
|
- name: get default vm.min_free_kbytes
|
|
command: sysctl -b vm.min_free_kbytes
|
|
changed_when: false
|
|
failed_when: false
|
|
always_run: true
|
|
register: default_vm_min_free_kbytes
|
|
|
|
- name: define vm.min_free_kbytes
|
|
set_fact:
|
|
vm_min_free_kbytes: "{{ 4194303 if ansible_memtotal_mb >= 49152 else default_vm_min_free_kbytes.stdout }}"
|
|
|
|
- name: apply operating system tuning
|
|
sysctl:
|
|
name: "{{ item.name }}"
|
|
value: "{{ item.value }}"
|
|
state: present
|
|
sysctl_file: /etc/sysctl.conf
|
|
ignoreerrors: yes
|
|
with_items: os_tuning_params
|