File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,31 @@ source "openstack" "openhpc" {
33
33
ssh_bastion_host = " 128.232.222.183"
34
34
ssh_bastion_username = " ${ var . ssh_bastion_username } "
35
35
ssh_bastion_private_key_file = " ~/.ssh/id_rsa"
36
- image_name = " ${ source . name } -${ local . timestamp } .qcow2"
37
36
ports = [var . port_id ]
38
37
}
39
38
40
39
build {
41
40
source "source.openstack.openhpc" {
41
+ name = " inbox"
42
+ image_name = " openhpc-${ local . timestamp } .qcow2"
43
+ }
44
+
45
+ source "source.openstack.openhpc" {
46
+ name = " ofed"
47
+ image_name = " openhpc-${ local . timestamp } -ofed.qcow2"
42
48
}
43
49
44
50
provisioner "ansible" {
45
51
playbook_file = " playbooks/build.yml" # can't use ansible FQCN here
46
52
use_proxy = false # see https://www.packer.io/docs/provisioners/ansible#troubleshooting
47
- extra_arguments = [" -v" ]
53
+ override = {
54
+ inbox = {
55
+ extra_arguments = [" -v" ]
56
+ }
57
+ ofed = {
58
+ extra_arguments = concat ([" -v" ], [" -e" , " ofed_install=yes" ])
59
+ }
60
+ }
48
61
ansible_ssh_extra_args = [" -o ProxyCommand='ssh ${ var . ssh_bastion_username } @${ var . ssh_bastion_host } -W %h:%p'" ]
49
62
}
50
63
Original file line number Diff line number Diff line change
1
+ ofed_install : false
1
2
ofed_version : 5.6-1.0.3.3
2
3
ofed_download_url : https://content.mellanox.com/ofed/MLNX_OFED-{{ ofed_version }}/MLNX_OFED_SRC-{{ ofed_version }}.tgz
3
4
ofed_tmp_dir : /tmp
Original file line number Diff line number Diff line change 26
26
27
27
- import_tasks : dnf_repos.yml
28
28
- import_tasks : ofed.yml
29
+ when : " {{ ofed_install | default(false) }}"
29
30
- import_tasks : dnf_packages.yml
30
31
- import_tasks : prometheus.yml
31
32
- import_tasks : nodeexporter.yml
You can’t perform that action at this time.
0 commit comments