Manage transparent-huge-pages system settings.
This role requires Ansible 2.8 or higher, and platform requirements are listed in the metadata file.
This role use Molecule to run tests.
Local and Github Actions tests run tests on Docker by default. See molecule documentation to use other backend.
Currently, tests are done on:
- CentOS 7
- CentOS 8
- Debian Buster
- Debian Stretch
- Ubuntu Bionic
- Ubuntu Focal
and use:
- Ansible 2.8.x
- Ansible 2.9.x
$ tox
You can also configure molecule options and molecule command using environment variables:
MOLECULE_OPTIONS
Default: "--debug"MOLECULE_COMMAND
Default: "test"
$ MOLECULE_OPTIONS='' MOLECULE_COMMAND=converge tox
# Service file content
thp_sys_settings: "{{ _thp_sys_settings | default([]) }}"
# Service type
thp_use_init_file: "{{ _thp_use_init_file | default(True) }}"
# Service settings
thp_service_name: 'disable-transparent-huge-pages'
thp_service_enabled: True
# Init services
thp_init_file:
path: "/etc/init.d/{{ thp_service_name }}"
owner: 'root'
group: 'root'
mode: '0755'
thp_init_x_start_before: []
_thp_sys_settings:
- key: '/sys/kernel/mm/transparent_hugepage/enabled'
value: 'never'
- key: '/sys/kernel/mm/transparent_hugepage/defrag'
value: 'never'
None
- hosts: servers
roles:
- { role: infOpen.transparent-huge-pages }
MIT
Alexandre Chaussier (for Infopen company)
- https://www.infopen.pro
- a.chaussier [at] infopen.pro