tripleo-heat-templates/extraconfig/tasks/ssh/host_public_key.yaml
Carlos Camacho 0a0e2ee629 Update the template_version alias for all the templates to pike.
Master is now the development branch for pike
changing the release alias name.

Change-Id: I938e4a983e361aefcaa0bd9a4226c296c5823127
2017-05-19 09:58:07 +02:00

43 lines
1.3 KiB
YAML

heat_template_version: pike
description: >
This is a template which will fetch the ssh host public key.
parameters:
server:
description: ID of the node to apply this config to
type: string
resources:
SshHostPubKeyConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
outputs:
- name: rsa
- name: ecdsa
- name: ed25519
config: |
#!/bin/sh -x
test -e '/etc/ssh/ssh_host_rsa_key.pub' && cat /etc/ssh/ssh_host_rsa_key.pub > $heat_outputs_path.rsa
test -e '/etc/ssh/ssh_host_ecdsa_key.pub' && cat /etc/ssh/ssh_host_ecdsa_key.pub > $heat_outputs_path.ecdsa
test -e '/etc/ssh/ssh_host_ed25519_key.pub' && cat /etc/ssh/ssh_host_ed25519_key.pub > $heat_outputs_path.ed25519
SshHostPubKeyDeployment:
type: OS::Heat::SoftwareDeployment
properties:
config: {get_resource: SshHostPubKeyConfig}
server: {get_param: server}
outputs:
ecdsa:
description: Host ssh public key (ecdsa)
value: {get_attr: [SshHostPubKeyDeployment, ecdsa]}
rsa:
description: Host ssh public key (rsa)
value: {get_attr: [SshHostPubKeyDeployment, rsa]}
ed25519:
description: Host ssh public key (ed25519)
value: {get_attr: [SshHostPubKeyDeployment, ed25519]}