diff --git a/ansible/cleanup.yml b/ansible/cleanup.yml index e0fabf5e1..9c1373667 100644 --- a/ansible/cleanup.yml +++ b/ansible/cleanup.yml @@ -38,3 +38,28 @@ - name: Cleanup /tmp command : rm -rf /tmp/* + +- name: Get package facts + package_facts: + +- name: Ensure image summary directory exists + file: + path: /var/lib/image/ + state: directory + owner: root + group: root + mode: u=rwX,go=rX + +- name: Write image summary + copy: + content: "{{ image_info | to_nice_json }}" + dest: /var/lib/image/image.json + vars: + image_info: + branch: "{{ lookup('pipe', 'git rev-parse --abbrev-ref HEAD') }}" + build: "{{ ansible_nodename | split('.') | first }}" # hostname is image name, which contains build info + os: "{{ ansible_distribution }} {{ ansible_distribution_version }}" + kernel: "{{ ansible_kernel }}" + ofed: "{{ ansible_facts.packages['mlnx-ofa_kernel'].0.version | default('-') }}" + cuda: "{{ ansible_facts.packages['cuda'].0.version | default('-') }}" + slurm-ohpc: "{{ ansible_facts.packages['slurm-ohpc'].0.version | default('-') }}" diff --git a/ansible/fatimage.yml b/ansible/fatimage.yml index 58e1d72c7..81c4a2043 100644 --- a/ansible/fatimage.yml +++ b/ansible/fatimage.yml @@ -177,9 +177,9 @@ - hosts: builder become: yes - gather_facts: no + gather_facts: yes + tags: finalise tasks: - # - meta: end_here - name: Cleanup image import_tasks: cleanup.yml diff --git a/environments/.stackhpc/terraform/main.tf b/environments/.stackhpc/terraform/main.tf index 0b34a4947..c192eb222 100644 --- a/environments/.stackhpc/terraform/main.tf +++ b/environments/.stackhpc/terraform/main.tf @@ -29,9 +29,10 @@ variable "cluster_image" { description = "single image for all cluster nodes, keyed by os_version - a convenience for CI" type = map(string) default = { - # https://github.com/stackhpc/ansible-slurm-appliance/pull/427 - RL8: "openhpc-ofed-RL8-240906-1042-32568dbb" - RL9: "openhpc-ofed-RL9-240906-1041-32568dbb" + # https://github.com/stackhpc/ansible-slurm-appliance/pull/444 + RL8: "openhpc-ofed-RL8-241002-1612-1ce702b1" + RL9: "openhpc-ofed-RL9-241003-1052-1ce702b1" + RL9-cuda: "openhpc-cuda-RL9-241002-1612-1ce702b1" } }