Skip to content

Commit

Permalink
execute the commands with sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
rgl committed Jan 10, 2023
1 parent 04b1651 commit 5bc801f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ubuntu-vsphere.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -126,26 +126,30 @@ build {
}

provisioner "shell" {
execute_command = "sudo -S {{ .Vars }} bash {{ .Path }}"
expect_disconnect = true
scripts = [
"reboot.sh",
]
}

provisioner "shell" {
execute_command = "sudo -S {{ .Vars }} bash {{ .Path }}"
scripts = [
"provision-guest-additions.sh",
]
}

provisioner "shell" {
execute_command = "sudo -S {{ .Vars }} bash {{ .Path }}"
expect_disconnect = true
scripts = [
"reboot.sh",
]
}

provisioner "shell" {
execute_command = "sudo -S {{ .Vars }} bash {{ .Path }}"
scripts = [
"provision.sh",
]
Expand Down

0 comments on commit 5bc801f

Please sign in to comment.