From fd8b5c8e8529df5d00c240b1b3e76336e365dd29 Mon Sep 17 00:00:00 2001 From: VC Date: Mon, 4 Nov 2024 10:24:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F:=20set=20cpu=20power=20to=20?= =?UTF-8?q?low=20for=20NAS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playbooks/nas.yml | 1 + roles/cpupower/tasks/main.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 roles/cpupower/tasks/main.yml diff --git a/playbooks/nas.yml b/playbooks/nas.yml index c57e945..033f8a3 100644 --- a/playbooks/nas.yml +++ b/playbooks/nas.yml @@ -7,3 +7,4 @@ - zfs - nfs - smart + - cpupower diff --git a/roles/cpupower/tasks/main.yml b/roles/cpupower/tasks/main.yml new file mode 100644 index 0000000..c1f0e66 --- /dev/null +++ b/roles/cpupower/tasks/main.yml @@ -0,0 +1,12 @@ +--- + +- name: Install cpupower + ansible.builtin.apt: + name: linux-cpupower + update_cache: true + state: present + +- name: Set cpupower to min + ansible.builtin.command: cpupower frequency-set -r -g powersave + register: cpupower_output + changed_when: cpupower_output.rc != 0