23cca0566e576d67723334f00e8410fa0fd362a2
[csit.git] / resources / tools / testbed-setup / ansible / roles / performance_tuning / tasks / turbo_boost.yaml
1 ---
2 # file: roles/performance_tuning/tasks/turbo_boost.yaml
3
4 - Name: Update package cache (apt)
5   apt:
6     update_cache: yes
7     cache_valid_time: 3600
8   when:
9     - ansible_distribution|lower == 'ubuntu'
10
11 - name: Turbo Boost - Install msr-tools
12   package:
13     name:
14       - "msr-tools"
15     state: latest
16   tags:
17     - turbo-boost
18
19 - name: Turbo Boost - Load msr By Default
20   lineinfile:
21     path: "/etc/modules"
22     state: "present"
23     line: "msr"
24   tags:
25     - turbo-boost
26
27 - name: Turbo Boost - Custom Startup Service Hook
28   copy:
29     src: "files/disable-turbo-boost.service"
30     dest: "/etc/systemd/system/disable-turbo-boost.service"
31     owner: "root"
32     group: "root"
33     mode: "0644"
34   tags:
35     - turbo-boost
36
37 - name: Turbo Boost - Custom Startup Service Hook Enable
38   service:
39     name: "disable-turbo-boost"
40     enabled: yes
41   tags:
42     - turbo-boost