caermeglaeddyv.ansible_role_no_thp

Ansible Role: Disable Transparent Huge Pages (THP)

This role is designed to turn off transparent huge pages (THP) using a tuned profile and a systemd service.

Current Features:

  • Creates a new tuned profile to disable THP and activates it.
  • Sets up a systemd service to disable THP every time the system starts.

Requirements

These are not strict but the role is tested with specific versions:

  • Ansible version must be 2.8.6 or higher.
  • CentOS version must be 7.6 (1803) or higher.

Role Variables

Here's a variable used in the role:

# Base tuned profile for the no-thp profile:
no_thp_tuned_profile: virtual-guest

Dependencies

None required.

Example Playbook

---
- hosts: localhost
  gather_facts: false
  become: no
  tasks:
  - name: Validate ansible version >=2.8.6
    assert:
      msg: Ansible must be v2.8.6 or higher
      that:
      - ansible_version.string is version("2.8.6", ">=")
    tags:
    - check
  vars:
    ansible_connection: local

- hosts: all
  become: yes
  tasks:
  - import_role:
      name: no_thp

For more examples (like inventories and playbooks) for this and other roles, check here.

It's recommended to start testing your deployments from this repository, particularly if you're using Google Cloud Platform or VMware vCenter. The repository also includes examples of Packer and Terraform for creating templates and deploying machines.

License

Apache 2.0

Author Information

Copyright 2020 caermeglaeddyv

Installa
ansible-galaxy install caermeglaeddyv.ansible_role_no_thp
Licenza
apache-2.0
Download
142
Proprietario