File: configuration.rb

package info (click to toggle)
puppet-agent 8.10.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,404 kB
  • sloc: ruby: 286,820; sh: 492; xml: 116; makefile: 88; cs: 68
file content (105 lines) | stat: -rw-r--r-- 4,663 bytes parent folder | download | duplicates (2)
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
# frozen_string_literal: true

config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc => "A reference for all settings") do
  docs = {}
  Puppet.settings.each do |name, object|
    docs[name] = object
  end

  str = ''.dup
  docs.sort { |a, b|
    a[0].to_s <=> b[0].to_s
  }.each do |name, object|
    # Make each name an anchor
    header = name.to_s
    str << markdown_header(header, 3)

    # Print the doc string itself
    begin
      str << Puppet::Util::Docs.scrub(object.desc)
    rescue => detail
      Puppet.log_exception(detail)
    end
    str << "\n\n"

    # Now print the data about the item.
    val = object.default
    case name.to_s
    when 'vardir'
      val = 'Unix/Linux: /opt/puppetlabs/puppet/cache -- Windows: C:\ProgramData\PuppetLabs\puppet\cache -- Non-root user: ~/.puppetlabs/opt/puppet/cache'
    when 'publicdir'
      val = 'Unix/Linux: /opt/puppetlabs/puppet/public -- Windows: C:\ProgramData\PuppetLabs\puppet\public -- Non-root user: ~/.puppetlabs/opt/puppet/public'
    when 'confdir'
      val = 'Unix/Linux: /etc/puppetlabs/puppet -- Windows: C:\ProgramData\PuppetLabs\puppet\etc -- Non-root user: ~/.puppetlabs/etc/puppet'
    when 'codedir'
      val = 'Unix/Linux: /etc/puppetlabs/code -- Windows: C:\ProgramData\PuppetLabs\code -- Non-root user: ~/.puppetlabs/etc/code'
    when 'rundir'
      val = 'Unix/Linux: /var/run/puppetlabs -- Windows: C:\ProgramData\PuppetLabs\puppet\var\run -- Non-root user: ~/.puppetlabs/var/run'
    when 'logdir'
      val = 'Unix/Linux: /var/log/puppetlabs/puppet -- Windows: C:\ProgramData\PuppetLabs\puppet\var\log -- Non-root user: ~/.puppetlabs/var/log'
    when 'hiera_config'
      val = '$confdir/hiera.yaml. However, for backwards compatibility, if a file exists at $codedir/hiera.yaml, Puppet uses that instead.'
    when 'certname'
      val = "the Host's fully qualified domain name, as determined by Facter"
    when 'hostname'
      val = "(the system's fully qualified hostname)"
    when 'domain'
      val = "(the system's own domain)"
    when 'srv_domain'
      val = 'example.com'
    when 'http_user_agent'
      val = 'Puppet/<version> Ruby/<version> (<architecture>)'
    end

    # Leave out the section information; it was apparently confusing people.
    # str << "- **Section**: #{object.section}\n"
    unless val == ""
      str << "- *Default*: `#{val}`\n"
    end
    str << "\n"
  end

  return str
end

config.header = <<~EOT
  ## Configuration settings

  * Each of these settings can be specified in `puppet.conf` or on the
    command line.
  * Puppet Enterprise (PE) and open source Puppet share the configuration settings
    documented here. However, PE defaults differ from open source defaults for some
    settings, such as `node_terminus`, `storeconfigs`, `always_retry_plugins`,
    `disable18n`, `environment_timeout` (when Code Manager is enabled), and the
    Puppet Server JRuby `max-active-instances` setting. To verify PE configuration
    defaults, check the `puppet.conf` or `pe-puppet-server.conf` file after
    installation.
  * When using boolean settings on the command line, use `--setting` and
    `--no-setting` instead of `--setting (true|false)`. (Using `--setting false`
    results in "Error: Could not parse application options: needless argument".)
  * Settings can be interpolated as `$variables` in other settings; `$environment`
    is special, in that puppet master will interpolate each agent node's
    environment instead of its own.
  * Multiple values should be specified as comma-separated lists; multiple
    directories should be separated with the system path separator (usually
    a colon).
  * Settings that represent time intervals should be specified in duration format:
    an integer immediately followed by one of the units 'y' (years of 365 days),
    'd' (days), 'h' (hours), 'm' (minutes), or 's' (seconds). The unit cannot be
    combined with other units, and defaults to seconds when omitted. Examples are
    '3600' which is equivalent to '1h' (one hour), and '1825d' which is equivalent
    to '5y' (5 years).
  * If you use the `splay` setting, note that the period that it waits changes
    each time the Puppet agent is restarted.
  * Settings that take a single file or directory can optionally set the owner,
    group, and mode for their value: `rundir = $vardir/run { owner = puppet,
    group = puppet, mode = 644 }`
  * The Puppet executables ignores any setting that isn't relevant to
    their function.

  See the [configuration guide][confguide] for more details.

  [confguide]: https://puppet.com/docs/puppet/latest/config_about_settings.html


EOT