mirror of
https://github.com/saltstack-formulas/openssh-formula.git
synced 2025-04-17 10:10:28 +00:00
remove prefix when not needed
This commit is contained in:
parent
c100fc88a3
commit
ba72c1e8b7
1 changed files with 4 additions and 4 deletions
|
@ -7,14 +7,14 @@
|
|||
{%- macro render_option(keyword, default, config_dict=sshd_config) -%}
|
||||
{%- set value = config_dict.get(keyword, default) -%}
|
||||
{%- if value is sameas true -%}
|
||||
{{ prefix }}{{ keyword }} yes
|
||||
{{ keyword }} yes
|
||||
{%- elif value is sameas false -%}
|
||||
{{ prefix }}{{ keyword }} no
|
||||
{{ keyword }} no
|
||||
{%- elif value is string or value is number -%}
|
||||
{{ prefix }}{{ keyword }} {{ value }}
|
||||
{{ keyword }} {{ value }}
|
||||
{%- else -%}
|
||||
{%- for single_value in value -%}
|
||||
{{ prefix }}{{ keyword }} {{ single_value }}
|
||||
{{ keyword }} {{ single_value }}
|
||||
{% endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
|
Loading…
Add table
Reference in a new issue