redo users and ssh

This commit is contained in:
2023-12-22 18:57:01 -05:00
parent ee23c2db53
commit a07114ed85
13 changed files with 109 additions and 99 deletions

20
ssh/map.jinja Normal file
View File

@@ -0,0 +1,20 @@
{% 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_rsa',
}
}
}
} %}
{% else %}
{% set default = {} %}
{% endif %}
{% set ssh_users = salt.pillar.get('ssh:users', default, merge=True) %}