diff --git a/salt/states/tlu-harvester/files/images/.gitignore b/salt/states/tlu-harvester/files/images/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/salt/states/tlu-harvester/files/images/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/salt/states/tlu-harvester/files/keypair/admin.yaml b/salt/states/tlu-harvester/files/keypair/admin.yaml deleted file mode 100644 index 12591c1..0000000 --- a/salt/states/tlu-harvester/files/keypair/admin.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: harvesterhci.io/v1beta1 -kind: KeyPair -metadata: - name: admin - namespace: default -spec: - publicKey: | - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILGVNwMC2H+Fn4AhCDIa4MVfEYsVF7Zs2yHc8cGbv40l jonas@admin diff --git a/salt/states/tlu-harvester/files/keypair/exilio.yaml b/salt/states/tlu-harvester/files/keypair/exilio.yaml deleted file mode 100644 index cfa0b8f..0000000 --- a/salt/states/tlu-harvester/files/keypair/exilio.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: harvesterhci.io/v1beta1 -kind: KeyPair -metadata: - name: exilio - namespace: default -spec: - publicKey: | - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSJ4KrM7iwmUyvOznqNiTaYOIVxpog7Ktfr2xaJgH6O jonas@exsilio diff --git a/salt/states/tlu-harvester/files/manifests/images.sls b/salt/states/tlu-harvester/files/manifests/images.yaml similarity index 100% rename from salt/states/tlu-harvester/files/manifests/images.sls rename to salt/states/tlu-harvester/files/manifests/images.yaml diff --git a/salt/states/tlu-harvester/files/manifests/sshkeys.yaml b/salt/states/tlu-harvester/files/manifests/sshkeys.yaml new file mode 100644 index 0000000..407422d --- /dev/null +++ b/salt/states/tlu-harvester/files/manifests/sshkeys.yaml @@ -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 %} +