packer-cn/website/pages/docs/builders/null.mdx

60 lines
1.2 KiB
Plaintext
Raw Normal View History

---
2017-06-14 21:04:16 -04:00
description: |
2020-03-18 18:46:47 -04:00
The null Packer builder is not really a builder, it just sets up an SSH
connection and runs the provisioners. It can be used to debug provisioners
without incurring high wait times. It does not create any kind of image or
artifact.
2015-07-22 22:31:00 -04:00
layout: docs
2020-03-18 18:46:47 -04:00
page_title: Null - Builders
2020-03-24 19:48:37 -04:00
sidebar_title: 'Null'
---
# Null Builder
Type: `null`
2015-07-22 22:31:00 -04:00
The `null` Packer builder is not really a builder, it just sets up an SSH
connection and runs the provisioners. It can be used to debug provisioners
without incurring high wait times. It does not create any kind of image or
artifact.
## Basic Example
2015-07-22 22:31:00 -04:00
Below is a fully functioning example. It doesn't do anything useful, since no
provisioners are defined, but it will connect to the specified host via ssh.
2020-06-16 11:44:41 -04:00
<Tabs>
<Tab heading="JSON">
```json
{
2020-03-18 18:46:47 -04:00
"type": "null",
"ssh_host": "127.0.0.1",
"ssh_username": "foo",
"ssh_password": "bar"
}
```
2020-06-16 11:44:41 -04:00
</Tab>
<Tab heading="HCL2">
```hcl
source "null" "basic-example" {
ssh_host = "127.0.0.1"
ssh_username = "foo"
ssh_password = "bar"
}
build {
sources = ["sources.null.basic-example"]
}
```
</Tab>
</Tabs>
## Configuration Reference
The null builder has no configuration parameters other than the
2020-03-31 17:40:07 -04:00
[communicator](/docs/templates/communicator) settings.