|
34 | 34 | $dns_alt_names = [] |
35 | 35 | $use_srv_records = false |
36 | 36 |
|
37 | | - if defined('$::domain') { |
38 | | - $srv_domain = $facts['networking']['domain'] |
39 | | - } else { |
40 | | - $srv_domain = undef |
41 | | - } |
| 37 | + $srv_domain = fact('networking.domain') |
42 | 38 |
|
43 | 39 | # lint:ignore:puppet_url_without_modules |
44 | 40 | $pluginsource = 'puppet:///plugins' |
45 | 41 | $pluginfactsource = 'puppet:///pluginfacts' |
46 | 42 | # lint:endignore |
47 | 43 | $classfile = '$statedir/classes.txt' |
48 | 44 | $syslogfacility = undef |
49 | | - $environment = $::environment |
| 45 | + $environment = $server_facts['environment'] |
50 | 46 |
|
51 | 47 | # aio_agent_version is a core fact that's empty on non-AIO |
52 | 48 | $aio_package = fact('aio_agent_version') =~ String[1] |
|
199 | 195 |
|
200 | 196 | # Will this host be a puppet agent ? |
201 | 197 | $agent = true |
202 | | - $client_certname = $::clientcert |
| 198 | + $client_certname = $trusted['certname'] |
203 | 199 |
|
204 | | - if defined('$::puppetmaster') { |
205 | | - $puppetmaster = $::puppetmaster |
206 | | - } else { |
207 | | - $puppetmaster = undef |
208 | | - } |
| 200 | + # Set by the Foreman ENC |
| 201 | + $puppetmaster = getvar('puppetmaster') |
209 | 202 |
|
210 | 203 | # Hashes containing additional settings |
211 | 204 | $additional_settings = {} |
|
220 | 213 | $server_external_nodes = "${dir}/node.rb" |
221 | 214 | $server_trusted_external_command = undef |
222 | 215 | $server_request_timeout = 60 |
223 | | - $server_certname = $::clientcert |
| 216 | + $server_certname = $trusted['certname'] |
224 | 217 | $server_strict_variables = false |
225 | 218 | $server_http = false |
226 | 219 | $server_http_port = 8139 |
|
262 | 255 |
|
263 | 256 | $server_storeconfigs = false |
264 | 257 |
|
265 | | - $puppet_major = regsubst($::puppetversion, '^(\d+)\..*$', '\1') |
| 258 | + $puppet_major = regsubst($facts['puppetversion'], '^(\d+)\..*$', '\1') |
266 | 259 |
|
267 | 260 | if ($facts['os']['family'] =~ /(FreeBSD|DragonFly)/) { |
268 | 261 | $server_package = "puppetserver${puppet_major}" |
|
0 commit comments