heat-templates/hot/software-config/example-templates/example-os-apply-config-plus-cloud-config.yaml
Adrien Vergé 2a2fe91602 Fix linting errors in YAML
This change corrects many problems detected by the `yamllint` linter.
It's a preparation for enabling this linter in change
Ie746230f28fe3ed0cf218201d5a3810f7bc44070.

For instance, the first run of the YAML linter helped discovering a key
duplication problem in `oso_ha.yaml`: the `depends_on` key was present
twice, so the first occurence was ignored.

Other changes are cosmetic: extra spaces, extra blank lines, missing
newlines at end-of-file, etc.

Change-Id: I7f2369adfb152fd2a74b9b105e969e653e592922
2016-03-11 14:57:38 +01:00

80 lines
2.1 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).
This example includes additional configuration of cloud-init via
the user-data in addition to the StructuredDeployment
parameters:
key_name:
type: string
default: default
flavor:
type: string
default: m1.small
image:
type: string
default: heat-functional-tests-image
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
cloud_init_userdata:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: cloud_config}
cloud_config:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: /tmp/one
content: "The one is bar"
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
user_data:
get_resource: cloud_init_userdata
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] }