Skip to content

Commit b857018

Browse files
author
Matt Pryor
committed
Allow the use of flavor IDs in partition definition
1 parent 69f0ae6 commit b857018

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

group_vars/openstack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ state_volume_size: "{{ metrics_db_maximum_size + 10 }}"
2525
openhpc_slurm_partitions:
2626
- name: "standard"
2727
count: "{{ compute_count }}"
28-
flavor_name: "{{ compute_flavor }}"
28+
flavor: "{{ compute_flavor }}"
2929
default: "YES"

roles/cluster_infra/templates/resources.tf.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ resource "openstack_compute_instance_v2" "{{ partition.name }}" {
379379

380380
name = "{{ cluster_name }}-compute-{{ partition.name }}-${count.index}"
381381
image_id = "{{ cluster_previous_image | default(cluster_image) }}"
382+
{% if 'flavor_name' in partition %}
382383
flavor_name = "{{ partition.flavor_name }}"
384+
{% else %}
385+
flavor_id = "{{ partition.flavor }}"
386+
{% endif %}
383387

384388
network {
385389
port = openstack_networking_port_v2.{{ partition.name }}[count.index].id

0 commit comments

Comments
 (0)