How do I skip builders and go straight to provisioners or post-processors stages when using packer?

394 Views Asked by At

I want to skip the builders stage. How do I skip builders and go straight to provisioners or post-processors stages when using packer?

1

There are 1 best solutions below

0
lovsunshine On

Use "communicator": "none"

{
  "builders": [
    {
      "type": "null",
      "communicator": "none"
    }
  ],
  "provisioners": [
    {
      "type": "shell-local",
      "inline": ["exit 2"]
    }
  ],
  "error-cleanup-provisioner": {
    "type": "shell-local",
    "inline": ["echo 'rubber ducky'> ducky.txt"]
  }
}