The Power of Provisioners
So far, we have covered the basics of Packer templates and builders with a basic provisioner. Builders allow integrations to external platforms, hypervisors, and cloud providers via API integrations. Most likely, an image will need some runtime configuration before it’s saved and deployed. In this chapter, you will learn about the different types of provisioners available and what options you have to add artifacts or run tasks in a container or image. Common provisioners include local files or folders that should be uploaded to the image as well as scripts or processes that should be run as part of the building. The goal of provisioners is to minimize the work that needs to be done at runtime once an image is deployed. Classic examples of provisioners include these:
- Installing to disk from classic install media, ISO, or network boot
- Applying installation profiles, kickstarts, jumpstarts, or package groups
- Running Ansible playbooks, Chef...