hashicorp / terraform-google-consul

A Terraform Module for how to run Consul on Google Cloud using Terraform and Packer
Apache License 2.0
94 stars 90 forks source link

/opt/gruntwork/bash-commons/assert.sh: No such file or directory #18

Closed josh-padnick closed 6 years ago

josh-padnick commented 6 years ago

If you receive this error, it's because, as of v0.0.3, we now use the Gruntwork bash-commons repo for most of the generic bash functions. One of the scripts attempted to source a file (in this case /opt/gruntwork/bash-commons/assert.sh), but because the bash-commons were not installed, it didn't exist.

To fix this issue, add the following provisioner to your Packer template above any of the install-xxx scripts:

{
    "type": "shell",
    "inline": [
      "sudo mkdir -p /opt/gruntwork",
      "git clone --branch v0.0.3 https://github.com/gruntwork-io/bash-commons.git /tmp/bash-commons",
      "sudo cp -r /tmp/bash-commons/modules/bash-commons/src /opt/gruntwork/bash-commons"
    ]
  }

Check out the full Packer template example for additional details.