AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.
Popular Topics
About Luca Berton
Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.
Reduce Intel Laptop CPU Temperature Overheating In Linux - ansible module package and Thermald — Video Tutorial
How to reduce Intel laptop CPU Temperature overheating using Ansible Playbook with package module and zero-configuration Linux thermal daemon (thermald).
What You'll Learn
- How to Reduce Laptop CPU Temperature Overheating In Linux?
- Reduce Intel Laptop CPU Temperature Overheating In Linux
- Ansible Install a package in Linux
- Parameters
- Links
- Playbook
- code
- execution
- idempotency
- before execution
Full Tutorial Content
How to Reduce Laptop CPU Temperature Overheating In Linux?
I’m going to show you a live Playbook and some simple Ansible code.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Reduce Intel Laptop CPU Temperature Overheating In Linux
Today we’re talking about the open source project “Linux thermal daemon” (`thermald`) that monitors and controls the temperature in laptops, tablets PC with the latest Intel sandy bridge and latest Intel CPU releases.
The thermald tool operates in two modes:
- Zero Configuration Mode
For most users, this should be enough to bring the CPU temperature of the system under control. This uses a DTS temperature sensor and uses Intel P state driver, Power clamp driver, Running Average Power Limit control, and cpufreq as cooling methods.
- User-defined configuration mode
This allows ACPI-style configuration in a thermal XML configuration file. This can be used to fix the buggy ACPI configuration or fine-tune it by adding more sensors and cooling devices. This is the first step in implementing a close loop thermal control in user mode and can be enhanced based on community feedback and suggestions.
It’s available as a package “thermald” for the most used distribution today.
Please note that this service might degrade laptop performance byslowing the CPU.
Ansible Install a package in Linux
- ansible.builtin.package
- Generic OS package manager
Today we’re talking about the Ansible module package.
The full name is ansible.builtin.package, which means it is part of the collection of modules “builtin” with ansible and shipped with it.
These modules are pretty stable and out for years.
Its purpose is to act as a Generic OS package manager.
Parameters
- name string — name or package specific
- state string — present / installed/ absent /removed / latest
The most important parameters are “name” and “state”.
In the `name` parameter you are going to specify the name of the package or the specific version you would like to install.
The `state` specifies the action that we would like to perform. In our case install is “present or installed”.
Links
- https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html
- https://www.phoronix.com/scan.php?page=article&item=intel-thermald-tgl&num=1
- https://wiki.debian.org/thermald
Playbook
Let’s jump into a real-life playbook to install the thermald package and start the zero-configuration service in Linux using the Ansible Playbook.
code
```yaml
---
- name: thermald Playbook
hosts: all
become: true
tasks:
- name: thermald installed
ansible.builtin.package:
name: thermald
state: present
- name: thermald running
ansible.builtin.service:
name: thermald
state: started
enabled: true
```
execution
```bash
ansible-pilot $ ansible-playbook -i virtualmachines/demo/inventory thermald.yml
PLAY [thermald Playbook] ***************************************************
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 3 min
- Category: installation
Read the full written article: Reduce Intel Laptop CPU Temperature Overheating In Linux - ansible module package and Thermald
Related Video Tutorials
- Ansible Set File Permissions 755: chmod with file Module Guide — How to set file permissions with Ansible file module. Add execute permission (755, 644, 600), manage ownership, and apply permissions recursively.
- How to Add a Disk to a VMware VM Using Ansible Playbook — Learn how to add a disk to a VMware VM using an Ansible playbook. This guide includes the YAML configuration, variables, and execution steps for easy.
- Add Secondary Groups to Linux Users with Ansible Playbook — Learn how to add secondary groups to Linux users with an Ansible playbook. This step-by-step guide includes YAML configuration and execution details.
- ansible.builtin.command Module: Run Ad-Hoc Commands & Tasks (Guide) — How to run commands with Ansible command module (ansible.builtin.command). Execute ad-hoc tasks, manage remote systems, capture output with register.
- What’s New in Red Hat Ansible Automation Platform 2.6 — Explore Red Hat Ansible Automation Platform 2.6, featuring the new automation dashboard, Lightspeed Intelligent Assistant, and self-service automation portal.
- Configure Ansible Dynamic Inventory for VMware in Simple Steps — Discover how to configure Ansible Dynamic Inventory for VMware to automate and manage virtual machines efficiently. Step-by-step guide with Playbook included.