heat-templates/hot/software-config/example-templates/example-os-apply-config.yaml
Anant Patil 791daca910 Adding output section to templates
Adding output section to templates to make most use of the template.

Change-Id: I77f175b682fd0a5d074735eab3e60ad91fbdb67c
2015-05-20 15:34:56 +05:30

60 lines
1.6 KiB
YAML

heat_template_version: 2013-05-23
description: >
This template demonstrates how to use OS::Heat::StructuredDeployment
to apply config via os-apply-config. Note this requires your image to
be built with the ntp element added (not included in the instructions
in this repo by default, you'll have to add it and rebuild).
parameters:
key_name:
type: string
default: default
flavor:
type: string
default: m1.small
image:
type: string
default: fedora-software-config
ntp_server:
type: string
default: 0.uk.pool.ntp.org
resources:
config:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
ntp:
servers:
- {server: {get_param: ntp_server}}
deployment:
type: OS::Heat::StructuredDeployment
properties:
config:
get_resource: config
server:
get_resource: server
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: key_name}
user_data_format: SOFTWARE_CONFIG
outputs:
server_ip:
description: IP Address of server.
value: { get_attr: [server, first_address] }
deployment_status:
description: Status code of configuration execution.
value: { get_attr: [deployment, deploy_status_code] }
deployment_stdout:
description: Standard output captured from the configuration execution.
value: { get_attr: [deployment, deploy_stdout] }
deployment_stderr:
description: Standard error captured from the configuration execution.
value: { get_attr: [deployment, deploy_stderr] }