blob: 57d62e58ba14199483964ad59de92f40a0f44539 [file] [log] [blame]
Jiri Broulik0ce9fc92017-02-01 23:10:40 +01001{%- from "nova/map.jinja" import client with context %}
2{%- if client.enabled %}
3
4nova_client_packages:
5 pkg.installed:
6 - names: {{ client.pkgs }}
7
8{%- for identity_name, identity in client.server.iteritems() %}
9
Jiri Broulik70d9e3f2017-02-15 18:37:13 +010010{%- if identity.flavor is defined %}
11
Jiri Broulik0ce9fc92017-02-01 23:10:40 +010012{%- for flavor_name, flavor in identity.flavor.iteritems() %}
13
14nova_openstack_flavor_{{ flavor_name }}:
15 novang.flavor_present:
16 - name: {{ flavor_name }}
17 - profile: {{ identity_name }}
18
19 {%- if flavor.flavor_id is defined %}
20 - flavor_id: {{ flavor.flavor_id }}
21 {%- endif %}
22 {%- if flavor.ram is defined %}
23 - ram: {{ flavor.ram }}
24 {%- endif %}
25 {%- if flavor.disk is defined %}
26 - disk: {{ flavor.disk }}
27 {%- endif %}
28 {%- if flavor.vcpus is defined %}
29 - vcpus: {{ flavor.vcpus }}
30 {%- endif %}
31
32{%- endfor %}
33
Jiri Broulik70d9e3f2017-02-15 18:37:13 +010034{%- endif %}
35
36{%- if identity.availability_zones is defined %}
37
38{%- for availability_zone_name in identity.availability_zones %}
39nova_availability_zone_{{ availability_zone_name }}:
40 novang.availability_zone_present:
41 - availability_zone: {{ availability_zone_name }}
42 - profile: {{ identity_name }}
43{%- endfor %}
44
45{%- endif %}
46
Damian Szeluga5dca0f02017-04-13 17:27:15 +020047{%- if identity.aggregates is defined %}
48
49{%- for aggregate_name in identity.aggregates %}
50nova_aggregate_{{ aggregate_name }}:
51 novang.aggregate_present:
52 - aggregate: {{ aggregate_name }}
53 - profile: {{ identity_name }}
54{%- endfor %}
55
56{%- endif %}
57
Jiri Broulik0ce9fc92017-02-01 23:10:40 +010058{%- endfor %}
59
60{%- endif %}