ansible_role_no_thp
Ansible role: No THP
This role is used to disable transparent huge pages via tuned profile and systemd service unit file.
For now, it does the following:
- creates new tuned profile to disable THP and applies it
- creates oneshot systemd service to disable THP on every start
Requirements
This is not strict requirements and it may not work with other versions than tested ones. Anyway. feel free to test by yourself, suggest addition of new functionality and contribute.
Role is tested with:
- Ansible version >= 2.8.6
- CentOS version >= 7.6 (1803)
Role Variables
Variables and their descriptions copied from defaults/main.yml
# Tuned profile which is used as base in new no-thp profile:
no_thp_tuned_profile: virtual-guest
Dependencies
none
Example Playbook
---
- hosts: localhost
gather_facts: false
become: no
tasks:
- name: Check 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
More detailed examples ( inventories, playbooks etc. ) of this and other roles can be found here.
It's highly recommended to start you test deploys from there, especially if you use Google Cloud Platform or VMware vCenter as your infrastructure, for now that repository contains Packer and Terraform examples to build templates and deploy machines on this platforms.
License
Author Information
Copyright 2020 caermeglaeddyv
Linux / Kubernetes Administrator
ansible-galaxy install caermeglaeddyv/ansible-role-no_thp