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

View File

@@ -1,4 +0,0 @@
# Managed by Saltstack
{% for comment, key in salt.pillar.get('authorized_keys')[user].items() -%}
{{ key }} {{ comment }}
{% endfor -%}

View File

@@ -1,15 +0,0 @@
# Managed by Saltstack
{%- for host, config in salt.pillar.get('ssh_hosts', {}).get(user, {}).items() %}
Host {{ host }}
{%- for key, val in config.items() %}
{{ key }} {{ val }}
{%- endfor %}
{%- endfor %}
{%- if salt.pillar.get('restic:client:environ:RESTIC_REPOSITORY', '').startswith('sftp:') %}
{% set user=salt.pillar.get('restic:client:environ:RESTIC_REPOSITORY').split(':')[1] %}
Host {{ user }}
HostName kpi.keiran.us
User {{ user }}
Port 9022
IdentityFile /root/.ssh/id_rsa
{%- endif %}