Skip to content

Commit

Permalink
Fix SSH keys template
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Oct 11, 2024
1 parent 86f4d58 commit 8372be5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion artifacts/add_ssh_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
- name: Add the authorized_key to the nodes
authorized_key:
user: "{{ username }}"
key: "{{ ssh_key }}"
key: "{{ item }}"
loop: "{{ ssh_keys }}"
17 changes: 9 additions & 8 deletions templates/ssh_keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ imports:
description: Add a set of SSH Public Keys to the VMs

metadata:
template_version: "1.0.0"
template_version: "1.0.1"
template_name: SSH Keys
display_name: Add a set of SSH Public Keys
icon: images/ssh-icon.png
Expand All @@ -16,17 +16,18 @@ metadata:
- simple-node-disk.yml
tabs:
SSH Data:
- ssh_key:
tag_type: textarea
- ssh_keys

topology_template:

inputs:

ssh_key:
type: string
description: SSH Key/s to inject to the VM
default: ''
ssh_keys:
type: list
entry_schema:
type: string
description: SSH Keys to inject to the VM
default: []

node_templates:

Expand All @@ -39,4 +40,4 @@ topology_template:
configure:
implementation: https://raw.githubusercontent.com/grycap/tosca/main/artifacts/add_ssh_key.yml
inputs:
ssh_key: { get_input: ssh_key }
ssh_keys: { get_input: ssh_keys }

0 comments on commit 8372be5

Please sign in to comment.