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 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('-') }}"
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments