Skip to content

Commit 2861edb

Browse files
committed
merge conflict fixes
2 parents 9f00f11 + 85c95f0 commit 2861edb

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
@@ -43,3 +43,28 @@
4343
ansible.builtin.file:
4444
path: /var/lib/ansible-init.done
4545
state: absent
46+
47+
- name: Get package facts
48+
package_facts:
49+
50+
- name: Ensure image summary directory exists
51+
file:
52+
path: /var/lib/image/
53+
state: directory
54+
owner: root
55+
group: root
56+
mode: u=rwX,go=rX
57+
58+
- name: Write image summary
59+
copy:
60+
content: "{{ image_info | to_nice_json }}"
61+
dest: /var/lib/image/image.json
62+
vars:
63+
image_info:
64+
branch: "{{ lookup('pipe', 'git rev-parse --abbrev-ref HEAD') }}"
65+
build: "{{ ansible_nodename | split('.') | first }}" # hostname is image name, which contains build info
66+
os: "{{ ansible_distribution }} {{ ansible_distribution_version }}"
67+
kernel: "{{ ansible_kernel }}"
68+
ofed: "{{ ansible_facts.packages['mlnx-ofa_kernel'].0.version | default('-') }}"
69+
cuda: "{{ ansible_facts.packages['cuda'].0.version | default('-') }}"
70+
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
@@ -177,9 +177,9 @@
177177

178178
- hosts: builder
179179
become: yes
180-
gather_facts: no
180+
gather_facts: yes
181+
tags: finalise
181182
tasks:
182-
# - meta: end_here
183183
- name: Cleanup image
184184
import_tasks: cleanup.yml
185185

0 commit comments

Comments
 (0)