redo users and ssh
This commit is contained in:
20
ssh/map.jinja
Normal file
20
ssh/map.jinja
Normal 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) %}
|
||||
Reference in New Issue
Block a user