{#- Get the `tplroot` from `tpldir` #} {%- set fbkusersroot = slspath.split('/')[0] %} {%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %} {% if pillar.fbkusers is defined %} {% for user, options in fbkusers.items() %} {% if options["sshkey"] %} {% for key in options["sshkey"] %} sshkey-{{ user }}-{{ key }}: ssh_auth.present: - user: {{ user }} - name: {{ key }} {% endfor %} {% endif %} {% endfor %} {% endif %}