@@ -230,6 +230,76 @@ class { '::puppet':
230230}
231231` ` `
232232
233+ # Manage Facter/Openfact configuration
234+
235+ This module can manage the Facter/Openfact configuration if requested.
236+
237+ ` ` ` puppet
238+ class { 'puppet':
239+ # ...
240+ facter_config => {
241+ blocklist => [
242+ 'EC2', # Remove if running in AWS cloud
243+ 'az_metadata', # Remove if running in Azure cloud
244+ 'cloud', # Remove if running in any cloud
245+ 'load_averages',
246+ 'memory_noise',
247+ 'mountpoints',
248+ 'processors.speed',
249+ 'system_uptime',
250+ ],
251+ ttls => [
252+ { 'timezone' => '7 days' },
253+ { 'networking.fqdn' => '1 hour' },
254+ ],
255+ 'fact-groups' => {
256+ 'memory_noise' => [
257+ 'memory.swap.available',
258+ 'memory.swap.available_bytes',
259+ 'memory.swap.capacity',
260+ 'memory.swap.used',
261+ 'memory.swap.used_bytes',
262+ 'memory.system.available',
263+ 'memory.system.available_bytes',
264+ 'memory.system.capacity',
265+ 'memory.system.used',
266+ 'memory.system.used_bytes',
267+ ],
268+ }
269+ }
270+ }
271+ ` ` `
272+
273+ This is also possible with Hiera :
274+
275+ ` ` ` yaml
276+ puppet::facter_config:
277+ blocklist:
278+ - 'EC2', # Remove if running in AWS cloud
279+ - 'az_metadata', # Remove if running in Azure cloud
280+ - 'cloud', # Remove if running in any cloud
281+ - 'load_averages',
282+ - 'memory_noise',
283+ - 'mountpoints',
284+ - 'processors.speed',
285+ - 'system_uptime',
286+ ttls:
287+ - timezone: 30 days
288+ - 'networking.fqdn': 1 hour
289+ fact-groups:
290+ memory_noise:
291+ - 'memory.swap.available',
292+ - 'memory.swap.available_bytes',
293+ - 'memory.swap.capacity',
294+ - 'memory.swap.used',
295+ - 'memory.swap.used_bytes',
296+ - 'memory.system.available',
297+ - 'memory.system.available_bytes',
298+ - 'memory.system.capacity',
299+ - 'memory.system.used',
300+ - 'memory.system.used_bytes',
301+ ` ` `
302+
233303# Contributing
234304
235305* Fork the project
0 commit comments