f02742a981
This patch moves the t-i-e element code for hosts configuration into a t-h-t shell script that gets driven by a os-collect-config script hook. This helps accomplish several goals: - moves us away from t-i-e - gives us better signal handling in the error case (where the previous element relied on 99-refresh-completed - Allows the t-h-t undercloud installer to more easily consume this since it doesn't rely on the old os-apply-config metadata (which that installer doesn't support). Change-Id: I73c3d4818ef531a3559fab272521f44519e2f486
38 lines
963 B
YAML
38 lines
963 B
YAML
heat_template_version: 2016-10-14
|
|
description: 'All Hosts Config'
|
|
|
|
parameters:
|
|
hosts:
|
|
type: string
|
|
|
|
resources:
|
|
|
|
hostsConfigImpl:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
inputs:
|
|
- name: hosts
|
|
default:
|
|
list_join:
|
|
- ' '
|
|
- str_split:
|
|
- '\n'
|
|
- {get_param: hosts}
|
|
config: {get_file: scripts/hosts-config.sh}
|
|
|
|
outputs:
|
|
config_id:
|
|
description: The ID of the hostsConfigImpl resource.
|
|
value:
|
|
{get_resource: hostsConfigImpl}
|
|
hosts_entries:
|
|
description: |
|
|
The content that should be appended to your /etc/hosts if you want to get
|
|
hostname-based access to the deployed nodes (useful for testing without
|
|
setting up a DNS).
|
|
value: {get_attr: [hostsConfigImpl, config, hosts]}
|
|
OS::stack_id:
|
|
description: The ID of the hostsConfigImpl resource.
|
|
value: {get_resource: hostsConfigImpl}
|