From 4a5eec75d768132d0952cc45e9382ba26e22567c Mon Sep 17 00:00:00 2001 From: Enver Date: Fri, 12 Feb 2016 09:42:31 +0100 Subject: [PATCH] Incorporated suggestions after initial PR review --- sysctl/param.sls | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sysctl/param.sls b/sysctl/param.sls index 39287e2..9e510d1 100644 --- a/sysctl/param.sls +++ b/sysctl/param.sls @@ -2,34 +2,34 @@ # vim: ft=sls {## 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() %} - {% if param is mapping %} + {%- for param_name, param in sysctl_settings.get('params2', {}).items() -%} + {%- if param is mapping %} sysctl-present-{{ param_name }}: sysctl.present: - name: {{ param_name }} - value: {{ param.value }} - {% if param.config is defined %} + {%- if param.config is defined %} - config: {{ sysctl_settings.config.location }}/{{ param.config }} - {% endif %} - {% endif %} + {% endif -%} + {% endif -%} {% endfor %} {% else %} - {% for param in sysctl_settings.get('params', {}) %} - {% if param is mapping %} + {%- for param in sysctl_settings.get('params', {}) -%} + {%- if param is mapping %} sysctl-present-{{ param.name }}: sysctl.present: - name: {{ param.name }} - value: {{ param.value }} - {% if param.config is defined %} + {%- if param.config is defined %} - config: {{ sysctl_settings.config.location }}/{{ param.config }} - {% endif %} - {% endif %} + {% endif -%} + {% endif -%} {% endfor %} -{% endif %} +{%- endif -%}