mirror of
https://github.com/saltstack-formulas/sysctl-formula.git
synced 2024-11-28 01:18:18 +01:00
Incorporated suggestions after initial PR review
This commit is contained in:
parent
35792ec351
commit
4a5eec75d7
@ -2,34 +2,34 @@
|
|||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{## import settings from map.jinja ##}
|
{## import settings from map.jinja ##}
|
||||||
{% from "sysctl/map.jinja" import sysctl_settings with context %}
|
{%- from "sysctl/map.jinja" import sysctl_settings with context -%}
|
||||||
|
|
||||||
{% if sysctl_settings.params2 is defined %}
|
{%- if sysctl_settings.params2 is defined -%}
|
||||||
|
|
||||||
{% for param_name, param in sysctl_settings.get('params2', {}).items() %}
|
{%- for param_name, param in sysctl_settings.get('params2', {}).items() -%}
|
||||||
{% if param is mapping %}
|
{%- if param is mapping %}
|
||||||
sysctl-present-{{ param_name }}:
|
sysctl-present-{{ param_name }}:
|
||||||
sysctl.present:
|
sysctl.present:
|
||||||
- name: {{ param_name }}
|
- name: {{ param_name }}
|
||||||
- value: {{ param.value }}
|
- value: {{ param.value }}
|
||||||
{% if param.config is defined %}
|
{%- if param.config is defined %}
|
||||||
- config: {{ sysctl_settings.config.location }}/{{ param.config }}
|
- config: {{ sysctl_settings.config.location }}/{{ param.config }}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% for param in sysctl_settings.get('params', {}) %}
|
{%- for param in sysctl_settings.get('params', {}) -%}
|
||||||
{% if param is mapping %}
|
{%- if param is mapping %}
|
||||||
sysctl-present-{{ param.name }}:
|
sysctl-present-{{ param.name }}:
|
||||||
sysctl.present:
|
sysctl.present:
|
||||||
- name: {{ param.name }}
|
- name: {{ param.name }}
|
||||||
- value: {{ param.value }}
|
- value: {{ param.value }}
|
||||||
{% if param.config is defined %}
|
{%- if param.config is defined %}
|
||||||
- config: {{ sysctl_settings.config.location }}/{{ param.config }}
|
- config: {{ sysctl_settings.config.location }}/{{ param.config }}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user