Your company here — click to reach over 10,000 unique daily visitors

puppet-generate - Man Page

Generates Puppet code from Ruby definitions.


puppet generate action


Note that any setting that´s valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT

The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.


Whether to log verbosely.


Whether to log debug information.


types - Generates Puppet code for custom types


puppet generate types [--format format] [--force]


Generates definitions for custom resource types using Puppet code.

Types defined in Puppet code can be used to isolate custom type definitions between different environments.

Options --force - Forces the generation of output files (skips up-to-date checks).

--format <format> - The generation output format to use. Supported formats: pcore.



Generate Puppet type definitions for all custom resource types in the current environment:

$ puppet generate types

Generate Puppet type definitions for all custom resource types in the specified environment:

$ puppet generate types --environment development


April 2024 Puppet, Inc. Puppet manual