File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 38
38
39
39
- name : Cleanup /tmp
40
40
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('-') }}"
Original file line number Diff line number Diff line change 195
195
196
196
- hosts : builder
197
197
become : yes
198
- gather_facts : no
198
+ gather_facts : yes
199
+ tags : finalise
199
200
tasks :
200
- # - meta: end_here
201
201
- name : Cleanup image
202
202
import_tasks : cleanup.yml
203
203
You can’t perform that action at this time.
0 commit comments