Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / extraconfig / tasks / ssh / host_public_key.yaml
1 heat_template_version: pike
2
3 description: >
4   This is a template which will fetch the ssh host public key.
5
6 parameters:
7   server:
8     description: ID of the node to apply this config to
9     type: string
10
11 resources:
12   SshHostPubKeyConfig:
13     type: OS::Heat::SoftwareConfig
14     properties:
15       group: script
16       outputs:
17       - name: rsa
18       - name: ecdsa
19       - name: ed25519
20       config: |
21         #!/bin/sh -x
22         test -e '/etc/ssh/ssh_host_rsa_key.pub' && cat /etc/ssh/ssh_host_rsa_key.pub > $heat_outputs_path.rsa
23         test -e '/etc/ssh/ssh_host_ecdsa_key.pub' && cat /etc/ssh/ssh_host_ecdsa_key.pub > $heat_outputs_path.ecdsa
24         test -e '/etc/ssh/ssh_host_ed25519_key.pub' && cat /etc/ssh/ssh_host_ed25519_key.pub > $heat_outputs_path.ed25519
25
26   SshHostPubKeyDeployment:
27     type: OS::Heat::SoftwareDeployment
28     properties:
29       config: {get_resource: SshHostPubKeyConfig}
30       server: {get_param: server}
31
32
33 outputs:
34   ecdsa:
35     description: Host ssh public key (ecdsa)
36     value:  {get_attr: [SshHostPubKeyDeployment, ecdsa]}
37   rsa:
38     description: Host ssh public key (rsa)
39     value:  {get_attr: [SshHostPubKeyDeployment, rsa]}
40   ed25519:
41     description: Host ssh public key (ed25519)
42     value:  {get_attr: [SshHostPubKeyDeployment, ed25519]}