power/state: "root:power" | power/state: "root:power" | ||||
- devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | - devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | ||||
Sysfs definition with disabled automatic write. Attributes are saved | |||||
to configuration, but are not applied during the run. | |||||
Thay will be applied automatically after the reboot. | |||||
.. code-block:: yaml | |||||
linux: | |||||
system: | |||||
sysfs: | |||||
enable_apply: false | |||||
scheduler: | |||||
block/sda/queue/scheduler: deadline | |||||
.. note:: The `enable_apply` parameter defaults to `True` if not defined. | |||||
Huge Pages | Huge Pages | ||||
~~~~~~~~~~~~ | ~~~~~~~~~~~~ | ||||
- require: | - require: | ||||
- pkg: linux_sysfs_package | - pkg: linux_sysfs_package | ||||
{% set apply = system.get('sysfs', {}).pop('enable_apply', True) %} | |||||
{%- for name, sysfs in system.get('sysfs', {}).items() %} | {%- for name, sysfs in system.get('sysfs', {}).items() %} | ||||
/etc/sysfs.d/{{ name }}.conf: | /etc/sysfs.d/{{ name }}.conf: | ||||
{%- set sysfs_list = sysfs %} | {%- set sysfs_list = sysfs %} | ||||
{%- endif %} | {%- endif %} | ||||
{%- if apply %} | |||||
{%- for item in sysfs_list %} | {%- for item in sysfs_list %} | ||||
{%- set list_idx = loop.index %} | {%- set list_idx = loop.index %} | ||||
{%- for key, value in item.items() %} | {%- for key, value in item.items() %} | ||||
{%- endfor %} | {%- endfor %} | ||||
{%- endfor %} | {%- endfor %} | ||||
{%- endif %} | |||||
{%- endfor %} | {%- endfor %} |
subjects: | subjects: | ||||
- '@group1' | - '@group1' | ||||
sysfs: | sysfs: | ||||
enable_apply: true | |||||
scheduler: | scheduler: | ||||
block/sda/queue/scheduler: deadline | block/sda/queue/scheduler: deadline | ||||
power: | power: |