Commit 660d641a authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Rafael Monnerat

playbook: Add CPU scaling governor modifier role

parent 9c324ad4
---
- name: Get CPUs list
find:
paths: /sys/devices/system/cpu
patterns: 'cpu[0-9]+'
use_regex: yes
file_type: directory
register: cpus
- name: Check scaling governor exists for CPUs
stat:
path: '{{ item.path }}/cpufreq/scaling_governor'
with_items: '{{ cpus.files }}'
register: scaling_governor_stat
- name: Set CPU Scaling Governor
shell: 'echo {{ value }} > {{ item.stat.path }}'
with_items: '{{ scaling_governor_stat.results }}'
when: item.stat.exists
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment