blob: 7325aa4353af712baf215ef0243a9a355f2399ca [file] [log] [blame]
Zack Williams682450e2016-11-19 09:04:41 -07001tosca_definitions_version: tosca_simple_yaml_1_0
2
3imports:
4 - custom_types/xos.yaml
5
Zack Williamsa2763112017-01-03 11:38:38 -07006description: Adds OpenStack compute nodes
Zack Williams682450e2016-11-19 09:04:41 -07007
8topology_template:
9 node_templates:
10
11# Site/Deployment, fully defined in deployment.yaml
12 {{ site_name }}:
13 type: tosca.nodes.Site
Zack Williamsa2763112017-01-03 11:38:38 -070014 properties:
15 no-delete: true
16 no-create: true
17 no-update: true
Zack Williams682450e2016-11-19 09:04:41 -070018
19 {{ deployment_type }}:
20 type: tosca.nodes.Deployment
Zack Williamsa2763112017-01-03 11:38:38 -070021 properties:
22 no-delete: true
23 no-create: true
24 no-update: true
Zack Williams682450e2016-11-19 09:04:41 -070025
Zack Williamsa2763112017-01-03 11:38:38 -070026# OpenStack compute nodes
Zack Williams682450e2016-11-19 09:04:41 -070027{% for node in groups["compute"] %}
Zack Williams2478b302017-02-14 10:42:55 -070028{% if (('ipv4' in hostvars[node]['ansible_fabric']) or
29 ('ipv4' in hostvars[node]['ansible_br_int'])) %}
Zack Williams682450e2016-11-19 09:04:41 -070030 {{ hostvars[node]['ansible_hostname'] }}:
31 type: tosca.nodes.Node
32 requirements:
33 - site:
34 node: {{ site_name }}
35 relationship: tosca.relationships.MemberOfSite
36 - deployment:
37 node: {{ deployment_type }}
38 relationship: tosca.relationships.MemberOfDeployment
39
Zack Williamsa2763112017-01-03 11:38:38 -070040{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -070041{% endfor %}
42