mirror of
https://github.com/saltstack-formulas/sysctl-formula.git
synced 2024-11-30 20:05:56 +01:00
6a08317ae7
```bash Examining sysctl/map.jinja of type state [209] Jinja comment should have spaces before and after: {# comment #} sysctl/map.jinja:4 {## Start with defaults from defaults.sls and osfamilymap.yml ##} [209] Jinja comment should have spaces before and after: {# comment #} sysctl/map.jinja:21 {## Apply backwards compatiblility after merge ##} [209] Jinja comment should have spaces before and after: {# comment #} sysctl/map.jinja:29 {## Merge in sysctl pillar ##} ```
36 lines
983 B
Django/Jinja
36 lines
983 B
Django/Jinja
# -*- coding: utf-8 -*-
|
|
# vim: ft=jinja
|
|
|
|
{#- Start with defaults from defaults.sls and osfamilymap.yml #}
|
|
{% import_yaml 'sysctl/defaults.yml' as default_settings %}
|
|
{% import_yaml "sysctl/osfamilymap.yml" as os_family_map %}
|
|
|
|
{% set osfam = salt['grains.filter_by'](
|
|
os_family_map,
|
|
grain='os_family',
|
|
) or {}
|
|
%}
|
|
|
|
{% do salt['defaults.merge'](default_settings['sysctl'], osfam) %}
|
|
{% do salt['defaults.merge'](
|
|
default_settings['sysctl'],
|
|
salt['pillar.get']('sysctl:lookup',{}),
|
|
)
|
|
%}
|
|
|
|
{#- Apply backwards compatiblility after merge #}
|
|
{% if default_settings['sysctl']['params'] is defined %}
|
|
{% do default_settings['sysctl'].pop('params') %}
|
|
{% endif %}
|
|
{% if default_settings['sysctl']['params2'] is defined %}
|
|
{% do default_settings['sysctl'].pop('params2') %}
|
|
{% endif %}
|
|
|
|
{#- Merge in sysctl pillar #}
|
|
{% set sysctl_settings = salt['pillar.get'](
|
|
'sysctl',
|
|
default=default_settings['sysctl'],
|
|
merge=True,
|
|
)
|
|
%}
|