2022-10-16 00:24:56 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- lscpu # need to kldload cpuctl
|
|
|
|
- powermon # need to kldload cpuctl
|
2023-09-06 00:43:12 +00:00
|
|
|
- cpu-microcode-intel
|
2022-10-16 00:24:56 +00:00
|
|
|
state: present
|
|
|
|
|
2022-10-15 23:51:54 +00:00
|
|
|
- name: Install loader.conf
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}_loader.conf"
|
|
|
|
dest: "/boot/loader.conf.d/{{ item }}.conf"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- coretemp
|
2022-10-16 00:24:56 +00:00
|
|
|
- cpuctl
|
|
|
|
- aesni
|
2023-09-06 00:43:12 +00:00
|
|
|
- intel_microcode
|
2022-10-15 23:51:54 +00:00
|
|
|
|
2023-05-28 20:51:17 +00:00
|
|
|
- name: Install service configuration
|
2022-10-15 23:51:54 +00:00
|
|
|
copy:
|
2023-05-28 20:51:17 +00:00
|
|
|
src: "files/{{ item }}_rc.conf"
|
|
|
|
dest: "/etc/rc.conf.d/{{ item }}"
|
2022-10-15 23:51:54 +00:00
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
2023-05-28 20:51:17 +00:00
|
|
|
- power_profile
|
2022-10-16 00:24:56 +00:00
|
|
|
|
|
|
|
- name: Install packages
|
2022-10-16 00:39:59 +00:00
|
|
|
when: hwpstate is defined and not hwpstate
|
2022-10-16 00:24:56 +00:00
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- powerdxx
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Install service configuration
|
2022-10-16 00:39:59 +00:00
|
|
|
when: hwpstate is defined and not hwpstate
|
2022-10-16 00:24:56 +00:00
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
2022-10-16 01:40:41 +00:00
|
|
|
loop:
|
2022-10-16 00:24:56 +00:00
|
|
|
- src: powerdxxrc.conf
|
|
|
|
dest: /etc/rc.conf.d/powerdxx
|
2022-10-16 00:54:58 +00:00
|
|
|
|
|
|
|
- name: Favor energy efficiency for Speed Shift
|
|
|
|
when: hwpstate is defined and hwpstate and cores is defined
|
|
|
|
sysctl:
|
|
|
|
name: "dev.hwpstate_intel.{{ item }}.epp"
|
|
|
|
value: 100
|
|
|
|
state: present
|
|
|
|
sysctl_file: "/etc/sysctl.conf.local"
|
|
|
|
loop: "{{ range(0, cores, 1)|list }}"
|
|
|
|
|
|
|
|
- name: Install scripts
|
|
|
|
when: hwpstate is defined and hwpstate
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
2023-03-25 13:21:43 +00:00
|
|
|
- src: cpu_set_perf_perc_freebsd
|
2022-10-16 00:54:58 +00:00
|
|
|
dest: /usr/local/bin/cpu_set_perf_perc
|
|
|
|
|
|
|
|
- name: Install loader.conf
|
|
|
|
when: hwpstate is defined and hwpstate
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}_loader.conf"
|
|
|
|
dest: "/boot/loader.conf.d/{{ item }}.conf"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
2024-04-28 16:53:25 +00:00
|
|
|
- per_core_hwpstate
|