File tree Expand file tree Collapse file tree 4 files changed +13
-44
lines changed Expand file tree Collapse file tree 4 files changed +13
-44
lines changed Original file line number Diff line number Diff line change 7373 else 'vd'
7474 }}
7575 # Only run when block_device_prefix isn't set as an extravar
76- when : block_device_prefix is not defined
76+ when :
77+ - block_device_prefix is not defined
78+ - cluster_image is defined
7779
7880
7981- name : Template Terraform files into project directory
Original file line number Diff line number Diff line change 11---
2- image_build_terraform_project_path : " {{ playbook_dir }}/terraform-image-build"
3- image_build_cluster_id : " image-build"
4-
5- # Regex to capture existing cloud image names to use as the
6- # OpenHPC Slurm base-image
7- image_build_existing_image_regex : " ^Rocky-8-GenericCloud-Base-8.7-.*"
8- # Attributes to sort the list of existing base images returned by
9- # image_build_existing_image_regex. See
10- # https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/images_image_ids_v2#sort
11- image_build_existing_image_sort_attributes : " name,updated_at"
12-
132# Attach a floating IP to the Packer build instance
143image_build_attach_floating_ip : false
154
Original file line number Diff line number Diff line change 11---
2+
23image_build_terraform_project_path : " {{ playbook_dir }}/terraform-image-build"
34image_build_cluster_id : " image-build"
45
Original file line number Diff line number Diff line change 11---
2- - debug :
3- msg : |
4- terraform_backend_type: {{ terraform_backend_type }}
5- terraform_state: {{ terraform_state }}
6-
7- - name : Install Terraform binary
8- include_role :
9- name : stackhpc.terraform.install
10-
11- - name : Make Terraform project directory
12- file :
13- path : " {{ image_build_terraform_project_path }}"
14- state : directory
15-
16- - name : Write backend configuration
17- copy :
18- content : |
19- terraform {
20- backend "{{ terraform_backend_type }}" { }
21- }
22- dest : " {{ image_build_terraform_project_path }}/backend.tf"
23-
24- - name : Template Terraform files into project directory
25- template :
26- src : " {{ item }}.j2"
27- dest : " {{ image_build_terraform_project_path }}/{{ item }}"
28- loop :
29- - outputs.tf
30- - providers.tf
31- - resources.tf
2+ - name : Get path to the image-buid Terraform templates directory
3+ set_fact :
4+ image_build_terraform_template_dir : " {{ role_path }}/templates"
325
33- - name : Provision infrastructure
6+ - name : Run cluster_infra role with image-build terraform template
347 include_role :
35- name : stackhpc.terraform.infra
8+ name : cluster_infra
9+ public : true
3610 vars :
11+ cluster_id : " {{ image_build_cluster_id }}"
12+ cluster_name : " {{ image_build_cluster_id }}"
13+ cluster_terraform_template_dir : " {{ image_build_terraform_template_dir }}"
3714 terraform_project_path : " {{ image_build_terraform_project_path }}"
3815
3916- name : Set image build infrastructure facts
You can’t perform that action at this time.
0 commit comments