⚡️: replace cpupower with customized tuned
This commit is contained in:
@@ -7,4 +7,4 @@
|
|||||||
- zfs
|
- zfs
|
||||||
- nfs
|
- nfs
|
||||||
- smart
|
- smart
|
||||||
- cpupower
|
- tuned
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- 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
|
|
1
roles/tuned/files/active_profile
Normal file
1
roles/tuned/files/active_profile
Normal file
@@ -0,0 +1 @@
|
|||||||
|
powersave spindown-disk
|
1
roles/tuned/files/profile_mode
Normal file
1
roles/tuned/files/profile_mode
Normal file
@@ -0,0 +1 @@
|
|||||||
|
manual
|
6
roles/tuned/handlers/main.yml
Normal file
6
roles/tuned/handlers/main.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Restart tuned
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: tuned
|
||||||
|
state: restarted
|
27
roles/tuned/tasks/main.yml
Normal file
27
roles/tuned/tasks/main.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install tuned
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
loop:
|
||||||
|
- tuned
|
||||||
|
- tuned-utils
|
||||||
|
|
||||||
|
- name: Put config files
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "files/{{ item }}"
|
||||||
|
dest: "/etc/tuned/{{ item }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0o644"
|
||||||
|
loop:
|
||||||
|
- active_profile
|
||||||
|
- profile_mode
|
||||||
|
notify: Restart tuned
|
||||||
|
|
||||||
|
- name: Ensure tuned is started
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: tuned
|
||||||
|
state: started
|
Reference in New Issue
Block a user