This commit is contained in:
jonas
2021-10-21 16:29:58 +02:00
parent f3826f8427
commit 5c17cb61d7
5 changed files with 15 additions and 20 deletions

View File

@@ -0,0 +1,15 @@
{% 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 %}