salt/states/systems/core/mount/auto.ssh

14 lines
511 B
Text
Raw Normal View History

2017-09-28 11:34:36 -05:00
{%- if sshfs is defined -%}
{% for mount in sshfs -%}
{%- if sshfs[mount]['user'] is defined -%}
{%- set user=sshfs[mount]['user'] -%}
{%- else -%}
{%- set user="mount" -%}
{%- endif -%}
{%- set host=sshfs[mount]['host'] -%}
{%- set dir=sshfs[mount]['directory'] %}
{%- set name=sshfs[mount]['name'] %}
{{name}} -fstype=fuse,rw,allow_other,idmap=user,IdentityFile=/root/.ssh/{{user}}_key :sshfs\#{{user}}@{{host}}\:{{dir}}
{%- endfor -%}
{% endif %}