0
0
mirror of https://github.com/saltstack-formulas/sysctl-formula.git synced 2024-12-01 11:11:55 +01:00
sysctl-formula/sysctl/init.sls

24 lines
558 B
Plaintext
Raw Normal View History

2015-01-24 17:14:58 +01:00
{% 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 -%}