packer-plugin-goss icon indicating copy to clipboard operation
packer-plugin-goss copied to clipboard

Provision with Packer and Chef

Open Montana opened this issue 2 years ago • 0 comments

Hey all,

To be clear I git cloned this repo, downloaded the binary and saved it as ~/.packer.d/plugins/packer-provisioner-goss with 0755 permissions.

This is a sample goss/goss.yml file, my real one looks similar obviously:

{
  "builders": [
    {
      "type": "googlecompute",
      "project_id": "foo",
      "zone": "us-west2-b",
      "machine_type": "n1-standard-2",
      "preemptible": true,
      "ssh_username": "ubuntu",
      "source_image_family": "ubuntu-1804-lts"
    }
  ],
  "provisioners": [
    {
      "type": "chef-solo",
      "version": "14.7.17",
      "cookbook_paths": [
        "cookbooks"
      ],
      "chef_environment": "myenv",
      "data_bags_path": "data_bags/myenv",
      "environments_path": "environments",
      "roles_path": "roles/myenv",
      "run_list": [
        "role[foo]"
      ]
    },
    {
      "type": "goss",
      "retry_timeout": "5m",
      "sleep": "5s",
      "tests": [
        "goss/goss.yml"
      ]
    }
  ]
}

I then run the following:

packer build

I come back with an error of:

Remote command exited with '1': chmod +x 

Any ideas? I highly appreciate it, Montana Mendy.

Montana avatar Oct 07 '22 05:10 Montana