Using Puppet code

Define the desired state of your infrastructure using Puppet code.

Puppet code is stored in modules. If you are new to Puppet or want to save time, use the pre-built and tested modules on the Puppet Forge — a repository of thousands of modules made by Puppet developers and the Puppet community.

Modules manage specific tasks in your infrastructure, such as installing and configuring a piece of software. Modules contain both code and data. The data is what allows you to customize your configuration. Using a tool called Hiera, you can separate the data from the code and place it in a centralized location. This allows you to specify guardrails and define known parameters and variations, so that your code is fully testable and you can validate all the edge cases of your parameters.

If you are an advanced user and want to write your own Puppet code, refer to the Puppet language and modules documentation.