-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.yaml
More file actions
66 lines (60 loc) · 1.63 KB
/
server.yaml
File metadata and controls
66 lines (60 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
heat_template_version: 2016-04-08
parameters:
flavor:
type: string
description: Flavor for the server to be created
constraints:
- custom_constraint: nova.flavor
image:
type: string
description: Image ID or image name to use for the server
constraints:
- custom_constraint: glance.image
key_name:
type: string
description: SSH Key Pair
constraints:
- custom_constraint: nova.keypair
server_name:
type: string
description: Name of the server
networks:
type: json
test:
type: string
resources:
server:
type: OS::Nova::Server
properties:
name: { get_param: server_name }
flavor: { get_param: flavor}
image: { get_param: image }
key_name: { get_param: key_name }
networks: { get_param: networks }
user_data_format: SOFTWARE_CONFIG
user_data: { get_attr: [config_agent, config] }
config_agent:
type: collect-config-setup/install_config_agent_rhel7_yum.yaml
server_ansible_config:
type: OS::Heat::SoftwareConfig
properties:
group: ansible
config:
str_replace:
template: { get_file: 'files/server-ansible.yaml' }
params:
_ipaddr_: { get_attr: [server, addresses, { get_param: [ networks, 1, network ] }, 0, addr ] }
outputs:
- name: result
deploy_ansible_config:
type: OS::Heat::SoftwareDeployment
depends_on: server
properties:
signal_transport: CFN_SIGNAL
config:
get_resource: server_ansible_config
server:
get_resource: server
outputs:
server_ip:
value: { get_attr: [ server, first_address ] }