1PUPPET-RESOURCE(8)               Puppet manual              PUPPET-RESOURCE(8)
2
3
4

NAME

6       puppet-resource - The resource abstraction layer shell
7

SYNOPSIS

9       Uses the Puppet RAL to directly interact with the system.
10

USAGE

12       puppet  resource  [-h|--help]  [-d|--debug]  [-v|--verbose] [-e|--edit]
13       [-p|--param parameter] [-t|--types] [-y|--to_yaml] type [name]  [attri‐
14       bute=value ...]
15

DESCRIPTION

17       This  command  provides simple facilities for converting current system
18       state into Puppet code, along with some ability to modify  the  current
19       state using Puppet´s RAL.
20
21       By  default,  you  must  at least provide a type to list, in which case
22       puppet resource will tell you everything it knows about  all  resources
23       of  that  type. You can optionally specify an instance name, and puppet
24       resource will only describe that single instance.
25
26       If given a type, a name, and a series of attribute=value pairs,  puppet
27       resource  will modify the state of the specified resource. Alternately,
28       if given a type, a name, and the ´--edit´ flag,  puppet  resource  will
29       write its output to a file, open that file in an editor, and then apply
30       the saved file as a Puppet transaction.
31

OPTIONS

33       Note that any setting that´s valid in the configuration file is also  a
34       valid  long  argument. For example, ´ssldir´ is a valid setting, so you
35       can specify ´--ssldir directory´ as an argument.
36
37       See   the   configuration   file    documentation    at    https://pup
38       pet.com/docs/puppet/latest/configuration.html  for the full list of ac‐
39       ceptable parameters. A commented list of all configuration options  can
40       also be generated by running puppet with ´--genconfig´.
41
42       --debug
43              Enable full debugging.
44
45       --edit Write  the  results  of the query to a file, open the file in an
46              editor, and read the file back in as an executable Puppet  mani‐
47              fest.
48
49       --help Print this help message.
50
51       --param
52              Add more parameters to be outputted from queries.
53
54       --types
55              List all available types.
56
57       --verbose
58              Print extra information.
59
60       --to_yaml
61              Output  found resources in yaml format, suitable to use with Hi‐
62              era and create_resources.
63

EXAMPLE

65       This example uses puppet resource to return a Puppet configuration  for
66       the user luke:
67
68
69
70           $ puppet resource user luke
71           user { ´luke´:
72            home => ´/home/luke´,
73            uid => ´100´,
74            ensure => ´present´,
75            comment => ´Luke Kanies,,,´,
76            gid => ´1000´,
77            shell => ´/bin/bash´,
78            groups => [´sysadmin´,´audio´,´video´,´puppet´]
79           }
80
81
82

AUTHOR

84       Luke Kanies
85
87       Copyright  (c)  2011 Puppet Inc., LLC Licensed under the Apache 2.0 Li‐
88       cense
89
90
91
92Puppet, Inc.                       May 2022                 PUPPET-RESOURCE(8)
Impressum