mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
Saltstack bootstrapping: fallback on wget if curl failed for any reason (such as not being installed)
This commit is contained in:
parent
df7c376e77
commit
5dd7fb11f4
1 changed files with 2 additions and 1 deletions
|
|
@ -167,7 +167,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
ui.Say("Provisioning with Salt...")
|
||||
if !p.config.SkipBootstrap {
|
||||
cmd := &packer.RemoteCmd{
|
||||
Command: fmt.Sprintf("curl -L https://bootstrap.saltstack.com -o /tmp/install_salt.sh"),
|
||||
// Fallback on wget if curl failed for any reason (such as not being installed)
|
||||
Command: fmt.Sprintf("curl -L https://bootstrap.saltstack.com -o /tmp/install_salt.sh || wget -O /tmp/install_salt.sh https://bootstrap.saltstack.com"),
|
||||
}
|
||||
ui.Message(fmt.Sprintf("Downloading saltstack bootstrap to /tmp/install_salt.sh"))
|
||||
if err = cmd.StartWithUi(comm, ui); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue