mirror of
https://github.com/saltstack-formulas/sysctl-formula.git
synced 2024-11-28 20:46:08 +01:00
24 lines
558 B
Plaintext
24 lines
558 B
Plaintext
{% from "sysctl/map.jinja" import sysctl with context %}
|
|
|
|
sysctl:
|
|
pkg.installed:
|
|
- name: {{ sysctl.pkg|json }}
|
|
|
|
{%- set config = pillar.get("sysctl", {} )%}
|
|
{%- for name, item in config.get('params', {}).items() %}
|
|
{%- if item == None -%}
|
|
{% set item = {} -%}
|
|
{%- endif -%}
|
|
{%- set value = item.get('value', {}) %}
|
|
{%- set config = item.get('config') %}
|
|
|
|
{{ name }}:
|
|
sysctl.present:
|
|
- name: {{ name }}
|
|
- value: {{ value }}
|
|
{%- if 'config' in item %}
|
|
- config: {{ sysctl.config_location}}/{{ config }}
|
|
{%- endif %}
|
|
{%- endfor -%}
|
|
|