Skip to content

Commit b61ee98

Browse files
authored
Merge branch 'main' into ci/nightly-builds
2 parents 22dcfbb + 85c95f0 commit b61ee98

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

ansible/cleanup.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,28 @@
3838

3939
- name: Cleanup /tmp
4040
command : rm -rf /tmp/*
41+
42+
- name: Get package facts
43+
package_facts:
44+
45+
- name: Ensure image summary directory exists
46+
file:
47+
path: /var/lib/image/
48+
state: directory
49+
owner: root
50+
group: root
51+
mode: u=rwX,go=rX
52+
53+
- name: Write image summary
54+
copy:
55+
content: "{{ image_info | to_nice_json }}"
56+
dest: /var/lib/image/image.json
57+
vars:
58+
image_info:
59+
branch: "{{ lookup('pipe', 'git rev-parse --abbrev-ref HEAD') }}"
60+
build: "{{ ansible_nodename | split('.') | first }}" # hostname is image name, which contains build info
61+
os: "{{ ansible_distribution }} {{ ansible_distribution_version }}"
62+
kernel: "{{ ansible_kernel }}"
63+
ofed: "{{ ansible_facts.packages['mlnx-ofa_kernel'].0.version | default('-') }}"
64+
cuda: "{{ ansible_facts.packages['cuda'].0.version | default('-') }}"
65+
slurm-ohpc: "{{ ansible_facts.packages['slurm-ohpc'].0.version | default('-') }}"

ansible/fatimage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@
195195

196196
- hosts: builder
197197
become: yes
198-
gather_facts: no
198+
gather_facts: yes
199+
tags: finalise
199200
tasks:
200-
# - meta: end_here
201201
- name: Cleanup image
202202
import_tasks: cleanup.yml
203203

0 commit comments

Comments
 (0)