44ef2a3ec1
The new master branch should point now to rocky. So, HOT templates should specify that they might contain features for rocky release [1] Also, this submission updates the yaml validation to use only latest heat_version alias. There are cases in which we will need to set the version for specific templates i.e. mixed versions, so there is added a variable to assign specific templates to specific heat_version aliases, avoiding the introductions of error by bulk replacing the the old version in new releases. [1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
heat_template_version: rocky
|
|
|
|
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
|
|
deployment_actions:
|
|
default: ['CREATE', 'UPDATE']
|
|
type: comma_delimited_list
|
|
description: >
|
|
List of stack actions that will trigger any deployments in this
|
|
templates. The actions will be an empty list of the server is in the
|
|
toplevel DeploymentServerBlacklist parameter's value.
|
|
|
|
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}
|
|
actions: {get_param: deployment_actions}
|
|
name: SshHostPubKeyDeployment
|
|
|
|
|
|
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]}
|