Make the formula fully pillar driven/customizable

- split package and param into separate state files
- use defaults.yml to specify all configurable options of the formula
- setup map.jinja to read in defaults.yml, filter by os_family for
  Arch, and merge in sysctl:lookup pillar
- Updated README
This commit is contained in:
puneet kandhari
2015-04-06 09:25:27 -05:00
parent b0c1b6ac56
commit 38eb852bce
7 changed files with 89 additions and 43 deletions
+5 -22
View File
@@ -1,23 +1,6 @@
{% 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 -%}
# -*- coding: utf-8 -*-
# vim: ft=sls
include:
- sysctl.package
- sysctl.param