-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
HashiCorp Packer in Production
By :
We briefly discussed the null builder in the previous chapter. As you develop complex provisioners, it may be useful to just test them immediately without waiting for minutes—or even hours—for build environments and communicators to be ready. The null builder contains only a communicator such that there is no environment to prepare. You can use this to immediately test provisioners in a stateful environment. You can even set ssh_host to localhost if you want to test the communicator using your own machine or don’t have a lab machine available with SSH access. Here is an example where Packer will immediately connect to the local SSH service using ssh-agent so that there is no need to present keys or passwords. Packer then runs through the provisioners in order so that you can test basic functionality and syntax:
source "null" "sandbox" {
ssh_host = "localhost"
...