File: config.md

package info (click to toggle)
puppet-agent 8.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,392 kB
  • sloc: ruby: 286,820; sh: 492; xml: 116; makefile: 88; cs: 68
file content (154 lines) | stat: -rw-r--r-- 4,406 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
layout: default
built_from_commit: 70303b65ae864066c583e1436011ff135847f6ad
title: 'Man Page: puppet config'
canonical: "/puppet/latest/man/config.html"
---

# Man Page: puppet config

> **NOTE:** This page was generated from the Puppet source code on 2024-08-29 17:41:46 -0700

## NAME
**puppet-config** - Interact with Puppet\'s settings.

## SYNOPSIS
puppet config *action* \[\--section SECTION_NAME\]

## DESCRIPTION
This subcommand can inspect and modify settings from Puppet\'s
\'puppet.conf\' configuration file. For documentation about individual
settings, see https://puppet.com/docs/puppet/latest/configuration.html.

## OPTIONS
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.

\--verbose

:   Whether to log verbosely.

\--debug

:   Whether to log debug information.

\--section SECTION_NAME

:   The section of the puppet.conf configuration file to interact with.

    The three most commonly used sections are \'main\', \'server\', and
    \'agent\'. \'Main\' is the default, and is used by all Puppet
    applications. Other sections can override \'main\' values for
    specific applications \-\-- the \'server\' section affects Puppet
    Server, and the \'agent\' section affects puppet agent.

    Less commonly used is the \'user\' section, which affects puppet
    apply. Any other section will be treated as the name of a legacy
    environment (a deprecated feature), and can only include the
    \'manifest\' and \'modulepath\' settings.

## ACTIONS
**delete** - Delete a Puppet setting.

:   **SYNOPSIS**

    puppet config delete \[\--section SECTION_NAME\] *setting*

    **DESCRIPTION**

    Deletes a setting from the specified section. (The default is the
    section \'main\').

    **NOTES**

    By default, this action deletes the configuration setting from the
    \'main\' configuration domain. Use the \'\--section\' flags to
    delete settings from other configuration domains.

**print** - Examine Puppet\'s current settings.

:   **SYNOPSIS**

    puppet config print \[\--section SECTION_NAME\] all \| *setting*
    \[*setting* \...\]

    **DESCRIPTION**

    Prints the value of a single setting or a list of settings.

    This action is a replacement interface to the information available
    with **puppet \<subcommand\> \--configprint**.

    **NOTES**

    By default, this action reads the general configuration in the
    \'main\' section. Use the \'\--section\' and \'\--environment\'
    flags to examine other configuration domains.

**set** - Set Puppet\'s settings.

:   **SYNOPSIS**

    puppet config set \[\--section SECTION_NAME\] \[setting_name\]
    \[setting_value\]

    **DESCRIPTION**

    Updates values in the **puppet.conf** configuration file.

    **NOTES**

    By default, this action manipulates the configuration in the
    \'main\' section. Use the \'\--section\' flag to manipulate other
    configuration domains.

## EXAMPLES
**delete**

Delete the setting \'setting_name\' from the \'main\' configuration
domain:

\$ puppet config delete setting_name

Delete the setting \'setting_name\' from the \'server\' configuration
domain:

\$ puppet config delete setting_name \--section server

**print**

Get puppet\'s runfile directory:

\$ puppet config print rundir

Get a list of important directories from the server\'s config:

\$ puppet config print all \--section server \| grep -E \"(path\|dir)\"

**set**

Set puppet\'s runfile directory:

\$ puppet config set rundir /var/run/puppetlabs

Set the vardir for only the agent:

\$ puppet config set vardir /opt/puppetlabs/puppet/cache \--section
agent

## COPYRIGHT AND LICENSE
Copyright 2011 by Puppet Inc. Apache 2 license; see COPYING