[Templates] Use str_replace for hosts.
There is a limit to how long input data can be for the heat script hook. Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c Closes-Bug: #1772673
This commit is contained in:
parent
a16cce6c4f
commit
6e901b3d6b
@ -11,15 +11,16 @@ resources:
|
||||
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}
|
||||
config:
|
||||
str_replace:
|
||||
params:
|
||||
WRITE_HOSTS:
|
||||
list_join:
|
||||
- ' '
|
||||
- str_split:
|
||||
- '\n'
|
||||
- {get_param: hosts}
|
||||
template: {get_file: scripts/hosts-config.sh}
|
||||
|
||||
outputs:
|
||||
config_id:
|
||||
|
@ -36,6 +36,7 @@ write_entries() {
|
||||
|
||||
}
|
||||
|
||||
hosts="WRITE_HOSTS"
|
||||
if [ ! -z "$hosts" ]; then
|
||||
for tmpl in /etc/cloud/templates/hosts.*.tmpl ; do
|
||||
write_entries "$tmpl" "$hosts"
|
||||
|
Loading…
Reference in New Issue
Block a user