- tp_smapi | - tp_smapi | ||||
- 8021q | - 8021q | ||||
Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example | |||||
Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example | |||||
will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`: | will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`: | ||||
.. code-block:: yaml | .. code-block:: yaml | ||||
java: | java: | ||||
- /usr/lib/jvm/jre-openjdk/lib/amd64/server | - /usr/lib/jvm/jre-openjdk/lib/amd64/server | ||||
- /opt/java/jre/lib/amd64/server | - /opt/java/jre/lib/amd64/server | ||||
Certificates | Certificates | ||||
~~~~~~~~~~~~ | ~~~~~~~~~~~~ | ||||
power/state: "root:power" | power/state: "root:power" | ||||
devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | ||||
Optional: You can also use list that will ensure order of items. | |||||
.. code-block:: yaml | |||||
linux: | |||||
system: | |||||
sysfs: | |||||
scheduler: | |||||
block/sda/queue/scheduler: deadline | |||||
power: | |||||
- mode: | |||||
power/state: 0660 | |||||
- owner: | |||||
power/state: "root:power" | |||||
- devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | |||||
Huge Pages | Huge Pages | ||||
~~~~~~~~~~~~ | ~~~~~~~~~~~~ | ||||
# Sysfs file for {{ name }} managed by salt-minion(1) | # Sysfs file for {{ name }} managed by salt-minion(1) | ||||
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | ||||
{%- for key, value in sysfs.items() %} | |||||
{%- if sysfs is mapping %} | |||||
{%- set sysfs_list = [sysfs] %} | |||||
{%- else %} | |||||
{%- set sysfs_list = sysfs %} | |||||
{%- endif %} | |||||
{%- for item in sysfs_list %} | |||||
{%- for key, value in item.items() %} | |||||
{%- if key in ["mode", "owner"] %} | {%- if key in ["mode", "owner"] %} | ||||
{%- for attr, val in value.items() %} | {%- for attr, val in value.items() %} | ||||
mode {{ attr }} = {{ val }} | mode {{ attr }} = {{ val }} | ||||
{{ key }} = {{ value }} | {{ key }} = {{ value }} | ||||
{%- endif %} | {%- endif %} | ||||
{%- endfor %} | {%- endfor %} | ||||
{%- endfor %} | |||||
{#- | {#- | ||||
vim: syntax=jinja | vim: syntax=jinja |
- require: | - require: | ||||
- file: /etc/sysfs.d | - file: /etc/sysfs.d | ||||
{%- for key, value in sysfs.items() %} | |||||
{%- if sysfs is mapping %} | |||||
{%- set sysfs_list = [sysfs] %} | |||||
{%- else %} | |||||
{%- set sysfs_list = sysfs %} | |||||
{%- endif %} | |||||
{%- for item in sysfs_list %} | |||||
{%- for key, value in item.items() %} | |||||
{%- if key not in ["mode", "owner"] %} | {%- if key not in ["mode", "owner"] %} | ||||
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %} | {%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %} | ||||
{#- Sysfs cannot be set in docker, LXC, etc. #} | {#- Sysfs cannot be set in docker, LXC, etc. #} | ||||
{%- endfor %} | {%- endfor %} | ||||
{%- endfor %} | {%- endfor %} | ||||
{%- endfor %} |