Bladeren bron

Merge pull request #12 from z-saltstack/auth-sls-clean-whitespaces

Removed unneeded whitespace from auth.sls
master
Seth House 10 jaren geleden
bovenliggende
commit
cee3f097f0
1 gewijzigde bestanden met toevoegingen van 24 en 25 verwijderingen
  1. +24
    -25
      openssh/auth.sls

+ 24
- 25
openssh/auth.sls Bestand weergeven

@@ -1,43 +1,42 @@
include:
- openssh

{% from "openssh/map.jinja" import openssh with context %}
{% set openssh_pillar = pillar.get('openssh', {}) %}
{% set auth = openssh_pillar.get('auth', {}) %}
{% for user,keys in auth.items() -%}
{% for key in keys -%}
{%- from "openssh/map.jinja" import openssh with context -%}
{%- set openssh_pillar = pillar.get('openssh', {}) -%}
{%- set auth = openssh_pillar.get('auth', {}) -%}
{%- for user,keys in auth.items() -%}
{%- for key in keys -%}
{% if 'present' in key and key['present'] %}
{{ key['name'] }}:
ssh_auth.present:
- user: {{ user }}
{% if 'source' in key %}
{%- if 'source' in key %}
- source: {{ key['source'] }}
{% else %}
{% if 'enc' in key %}
{%- else %}
{%- if 'enc' in key %}
- enc: {{ key['enc'] }}
{% endif %}
{% if 'comment' in key %}
{%- endif -%}
{%- if 'comment' in key %}
- comment: {{ key['comment'] }}
{% endif %}
{% if 'options' in key %}
{%- endif -%}
{%- if 'options' in key %}
- options: {{ key['options'] }}
{% endif %}
{% endif %}
{%- endif -%}
{%- endif %}
- require:
- service: {{ openssh.service }}
{% else %}
{%- else %}
{{ key['name'] }}:
ssh_auth.absent:
- user: {{ user }}
{% if 'enc' in key %}
{%- if 'enc' in key %}
- enc: {{ key['enc'] }}
{% endif %}
{% if 'comment' in key %}
{%- endif -%}
{%- if 'comment' in key %}
- comment: {{ key['comment'] }}
{% endif %}
{% if 'options' in key %}
{%- endif -%}
{%- if 'options' in key %}
- options: {{ key['options'] }}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}

Laden…
Annuleren
Opslaan