tlu/salt/states/tlu-harvester/files/manifests/sshkeys.yaml

16 lines
340 B
YAML
Raw Normal View History

2021-10-21 14:29:58 +00:00
{% for key in pillar['tlu-harvester']['os']['ssh_authorized_keys'] -%}
{% set len = key | length %}
{% set pos = len - key.rfind(' ') - 1 %}
{% set name = key[-pos:].replace('@','-') %}
---
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: {{ name }}
namespace: default
spec:
publicKey: |
{{ key }}
{% endfor %}