Files
salt-states/ssh/map.jinja
2025-05-05 01:09:27 -04:00

21 lines
533 B
Django/Jinja

{% set restic_repo = salt.pillar.get('restic:client:environ:RESTIC_REPOSITORY', '') %}
{% if restic_repo.startswith('sftp:') %}
{% set default = {
"root": {
"ssh_hosts": {
restic_repo.split(':')[1]: {
'HostName': 'kpi.keiran.us',
'User': restic_repo.split(':')[1],
'Port': 9022,
'IdentityFile': '/root/.ssh/id_ed25519',
}
}
}
} %}
{% else %}
{% set default = {} %}
{% endif %}
{% set ssh_users = salt.pillar.get('ssh:users', default, merge=True) %}