This commit is contained in:
2024-06-14 10:38:25 +08:00
commit 133692dcb4
9 changed files with 159 additions and 0 deletions

16
enable-cpu-boost.yaml Normal file
View File

@@ -0,0 +1,16 @@
- name: Enable CPU Boost on Linux Servers
hosts: all
become: yes
user: root
tasks:
- name: Gather facts
setup:
filter: ansible_processor*
- name: Enable CPU boost for AMD processors
shell: echo 1 > /sys/devices/system/cpu/cpufreq/boost
when: "'AuthenticAMD' in ansible_processor[1]"
- name: Enable CPU boost for Intel processors
shell: echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
when: "'GenuineIntel' in ansible_processor[1]"