1PUPPET-DEVICE(8) Puppet manual PUPPET-DEVICE(8)
2
3
4
6 puppet-device - Manage remote network devices
7
9 Retrieves catalogs from the Puppet master and applies them to remote
10 devices.
11
12 This subcommand can be run manually; or periodically using cron, a
13 scheduled task, or a similar tool.
14
16 puppet device [-h|--help] [-v|--verbose] [-d|--debug] [-l|--logdest
17 syslog|file|console] [--detailed-exitcodes] [--deviceconfig file]
18 [-w|--waitforcert seconds] [--libdir directory] [-a|--apply file]
19 [-f|--facts] [-r|--resource type [name]] [-t|--target device]
20 [--user=user] [-V|--version]
21
23 Devices require a proxy Puppet agent to request certificates, collect
24 facts, retrieve and apply catalogs, and store reports.
25
27 Devices managed by the puppet-device subcommand on a Puppet agent are
28 configured in device.conf, which is located at $confdir/device.conf by
29 default, and is configurable with the $deviceconfig setting.
30
31 The device.conf file is an INI-like file, with one section per device:
32
33 [DEVICE_CERTNAME] type TYPE url URL debug
34
35 The section name specifies the certname of the device.
36
37 The values for the type and url properties are specific to each type of
38 device.
39
40 The optional debug property specifies transport-level debugging, and is
41 limited to telnet and ssh transports.
42
43 See https://puppet.com/docs/puppet/latest/config_file_device.html for
44 details.
45
47 Note that any setting that´s valid in the configuration file is also a
48 valid long argument. For example, ´server´ is a valid configuration
49 parameter, so you can specify ´--server servername´ as an argument.
50
51 --help, -h
52 Print this help message
53
54 --verbose, -v
55 Turn on verbose reporting.
56
57 --debug, -d
58 Enable full debugging.
59
60 --logdest, -l
61 Where to send log messages. Choose between ´syslog´ (the POSIX
62 syslog service), ´console´, or the path to a log file. If debug‐
63 ging or verbosity is enabled, this defaults to ´console´. Other‐
64 wise, it defaults to ´syslog´.
65
66 A path ending with ´.json´ will receive structured output in
67 JSON format. The log file will not have an ending ´]´ automati‐
68 cally written to it due to the appending nature of logging. It
69 must be appended manually to make the content valid JSON.
70
71 --detailed-exitcodes
72 Provide transaction information via exit codes. If this is
73 enabled, an exit code of ´1´ means at least one device had a
74 compile failure, an exit code of ´2´ means at least one device
75 had resource changes, and an exit code of ´4´ means at least one
76 device had resource failures. Exit codes of ´3´, ´5´, ´6´, or
77 ´7´ means that a bitwise combination of the preceding exit codes
78 happened.
79
80 --deviceconfig
81 Path to the device config file for puppet device. Default:
82 $confdir/device.conf
83
84 --waitforcert, -w
85 This option only matters for targets that do not yet have cer‐
86 tificates and it is enabled by default, with a value of 120
87 (seconds). This causes +puppet device+ to poll the server every
88 2 minutes and ask it to sign a certificate request. This is use‐
89 ful for the initial setup of a target. You can turn off waiting
90 for certificates by specifying a time of 0.
91
92 --libdir
93 Override the per-device libdir with a local directory. Specify‐
94 ing a libdir also disables pluginsync. This is useful for test‐
95 ing.
96
97 --apply
98 Apply a manifest against a remote target. Target must be speci‐
99 fied.
100
101 --facts
102 Displays the facts of a remote target. Target must be specified.
103
104 --resource
105 Displays a resource state as Puppet code, roughly equivalent to
106 puppet resource. Can be filterd by title. Requires --target be
107 specified.
108
109 --target
110 Target a specific device/certificate in the device.conf. Doing
111 so will perform a device run against only that device/certifi‐
112 cate.
113
114 --to_yaml
115 Output found resources in yaml format, suitable to use with
116 Hiera and create_resources.
117
118 --user The user to run as.
119
121 $ puppet device --target remotehost --verbose
122
124 Brice Figureau
125
127 Copyright (c) 2011-2018 Puppet Inc., LLC Licensed under the Apache 2.0
128 License
129
130
131
132Puppet, Inc. January 2019 PUPPET-DEVICE(8)