0a0e2ee629
Master is now the development branch for pike changing the release alias name. Change-Id: I938e4a983e361aefcaa0bd9a4226c296c5823127
36 lines
836 B
YAML
36 lines
836 B
YAML
heat_template_version: pike
|
|
description: 'SSH Known Hosts Config'
|
|
|
|
parameters:
|
|
known_hosts:
|
|
type: string
|
|
|
|
resources:
|
|
|
|
SSHKnownHostsConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
inputs:
|
|
- name: known_hosts
|
|
default: {get_param: known_hosts}
|
|
config: |
|
|
#!/bin/bash
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
echo "Creating ssh known hosts file"
|
|
|
|
if [ ! -z "${known_hosts}" ]; then
|
|
echo "${known_hosts}"
|
|
echo -ne "${known_hosts}" > /etc/ssh/ssh_known_hosts
|
|
chmod 0644 /etc/ssh/ssh_known_hosts
|
|
else
|
|
rm -f /etc/ssh/ssh_known_hosts
|
|
echo "No ssh known hosts"
|
|
fi
|
|
|
|
outputs:
|
|
OS::stack_id:
|
|
description: The SSHKnownHostsConfig resource.
|
|
value: {get_resource: SSHKnownHostsConfig} |