github.com/hashicorp/packer@v1.14.3/website/content/partials/provisioners/common-config.mdx (about)

     1  Parameters common to all provisioners:
     2  
     3  - `pause_before` (duration) - Sleep for duration before execution.
     4  
     5  - `max_retries` (int) - Max times the provisioner will retry in case of failure. Defaults to zero (0). Zero means an error will not be retried.
     6  
     7  - `only` (array of string) - Only run the provisioner for listed builder(s)
     8    by name.
     9  
    10  - `override` (object) - Override the builder with different settings for a
    11    specific builder, eg :
    12  
    13    In HCL2:
    14  
    15    ```hcl
    16    source "null" "example1" {
    17      communicator = "none"
    18    }
    19  
    20    source "null" "example2" {
    21      communicator = "none"
    22    }
    23  
    24    build {
    25      sources = ["source.null.example1", "source.null.example2"]
    26      provisioner "shell-local" {
    27        inline = ["echo not overridden"]
    28        override = {
    29          example1 = {
    30            inline = ["echo yes overridden"]
    31          }
    32        }
    33      }
    34    }
    35    ```
    36  
    37    In JSON:
    38  
    39    ```json
    40    {
    41      "builders": [
    42        {
    43          "type": "null",
    44          "name": "example1",
    45          "communicator": "none"
    46        },
    47        {
    48          "type": "null",
    49          "name": "example2",
    50          "communicator": "none"
    51        }
    52      ],
    53      "provisioners": [
    54        {
    55          "type": "shell-local",
    56          "inline": ["echo not overridden"],
    57          "override": {
    58            "example1": {
    59              "inline": ["echo yes overridden"]
    60            }
    61          }
    62        }
    63      ]
    64    }
    65    ```
    66  
    67  - `timeout` (duration) - If the provisioner takes more than for example
    68    `1h10m1s` or `10m` to finish, the provisioner will timeout and fail.