PUPPET-APPLY(8)

πŸ’… PUPPET-APPLY(8) β€” the Puppet manual, but make it slay ✨

okay bestie, so this is puppet-apply from the Puppet manual (section 8, we're fancy like that) πŸŽ€


🌸 NAME 🌸

puppet-apply β€” apply Puppet manifests locally, like right here, on this very machine, no master required 🫢


✨ SYNOPSIS ✨

Applies a standalone Puppet manifest to the local system. That's it. That's the whole vibe. πŸ’–


πŸ¦‹ USAGE πŸ¦‹

puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose]
[-e|--execute] [--detailed-exitcodes] [-L|--loadclasses] [-l|--logdest
syslog|eventlog|ABS FILEPATH|console] [--noop] [--catalog catalog]
[--write-catalog-summary] file

look at her. iconic. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

This is the standalone puppet execution tool, bestie. You use it to apply individual manifests, one at a time, no middleman, no drama.

When you give it a modulepath β€” whether that's via the command line or via a config file β€” puppet apply can effectively mimic the catalog that puppet master would serve, as long as it has access to the same modules. although there are some subtle differences β€” no cap, subtle but real. And when you pair it up with scheduling and some automated system for pushing manifests? boom πŸ’₯ you've got yourself a whole serverless Puppet site. main character energy fr.

Most users should use puppet agent and puppet master for site-wide manifests. Like, for real. This is the solo-quest tool, not the whole-party tool. πŸ™ˆ

πŸ’– OPTIONS πŸ’–

okay so first things first: any setting that's valid in the configuration file is a valid long argument for puppet apply. For example, tags is a valid setting, so you can just go --tags class,tag as an argument. cute, right?

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. And if you want the whole menu, you can generate a commented list of all configuration options by running puppet with --genconfig. obsessed. πŸ“œ

  • --debug β€” Enable full debugging. she's loud, she's thorough, she's telling you everything πŸ›
  • --detailed-exitcodes β€” Provide extra information about the run via exit codes. If you enable this, puppet apply will use these exit codes:
    • 0: The run succeeded with no changes or failures; the system was already in the desired state. (iconic, nothing to do, we love a no-op win ✨)
    • 1: The run failed. πŸ’€
    • 2: The run succeeded, and some resources were changed. πŸ”₯
    • 4: The run succeeded, and some resources failed. 😭
    • 6: The run succeeded, and included both changes and failures. both?? at the same time?? the duality πŸ¦‹
  • --help β€” Print this help message. hi bestie πŸ‘‹
  • --loadclasses β€” Load any stored classes. puppet agent caches configured classes (usually at /etc/puppet/classes.txt), and setting this option causes all of those classes to be set in your puppet manifest. it's giving "bring the whole group chat" 🫢
  • --logdest β€” Where to send log messages. Choose between syslog (the POSIX syslog service), eventlog (the Windows Event Log), console, or the path to a log file. Defaults to console. Multiple destinations can be set using a comma separated list (eg: /path/file1,console,/path/file2)
    • A path ending with .json will receive structured output in JSON format. The log file will not have an ending ] automatically written to it due to the appending nature of logging. It must be appended manually to make the content valid JSON. (yes, manually. she will not do it for you. πŸ™ƒ)
    • A path ending with .jsonl will receive structured output in JSON Lines format. slay πŸ’…
  • --noop β€” Use noop mode where Puppet runs in a no-op or dry-run mode. This is useful for seeing what changes Puppet will make without actually executing the changes. peek before you leap, bestie πŸ“
  • --execute β€” Execute a specific piece of Puppet code. one-liner moment ⭐
  • --test β€” Enable the most common options used for testing. These are verbose, detailed-exitcodes and show_diff. the starter pack πŸŽ€
  • --verbose β€” Print extra information. yapper mode: on πŸ—£οΈ
  • --catalog β€” Apply a JSON catalog (such as one generated with puppet master --compile). You can either specify a JSON file or pipe in JSON from standard input. 🧚
  • --write-catalog-summary β€” After compiling the catalog saves the resource list and classes list to the node in the state directory named classes.txt and resources.txt. receipts, saved, permanently πŸ“

🌈 EXAMPLE 🌈

$ puppet apply -e Β΄notify { "hello world": }Β΄
$ puppet apply -l /tmp/manifest.log manifest.pp
$ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server"
$ puppet apply --catalog catalog.json

look at those. four little lines. each one a whole mood. 🌸


πŸ’œ AUTHOR πŸ’œ

Luke Kanies πŸ‘‘


Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License


and that's the whole page, bestie β€” go forth and apply some manifests responsibly πŸ’–

okay so real talk, this was puppet apply, brought to you by Puppet, Inc., and this lil manual page is dated September 2024. mwah, periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from