ceph-common: disable_transparent_hugepage now persist

pull/1422/head
Konstantin Shalygin 2017-04-08 13:06:18 +07:00
parent e2c8f1a404
commit 334d4cb885
No known key found for this signature in database
GPG Key ID: DAB31F3D3E5BCB69
2 changed files with 21 additions and 4 deletions

View File

@ -4,11 +4,25 @@
changed_when: false changed_when: false
failed_when: false failed_when: false
- name: create tmpfiles.d directory
file:
path: "/etc/tmpfiles.d"
state: "directory"
owner: "root"
group: "root"
mode: "0755"
register: "tmpfiles_d"
when: disable_transparent_hugepage
- name: disable transparent hugepage - name: disable transparent hugepage
shell: | template:
echo never > /sys/kernel/mm/transparent_hugepage/enabled src: "tmpfiles_hugepage.j2"
changed_when: false dest: "/etc/tmpfiles.d/ceph_transparent_hugepage.conf"
failed_when: false group: "root"
owner: "root"
mode: "0644"
force: "yes"
validate: "systemd-tmpfiles --create %s"
when: disable_transparent_hugepage when: disable_transparent_hugepage
- name: get default vm.min_free_kbytes - name: get default vm.min_free_kbytes

View File

@ -0,0 +1,3 @@
{{ '# ' + ansible_managed }}
{{ 'w /sys/kernel/mm/transparent_hugepage/enabled - - - - never' }}