simp-rspec-puppet-facts 3.13.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +121 -7
  3. data/facts/3.6/amazon-2-x86_64.facts +6 -6
  4. data/facts/5.1/almalinux-10-x86_64.facts +1437 -0
  5. data/facts/5.1/almalinux-8-x86_64.facts +1551 -0
  6. data/facts/5.1/almalinux-9-x86_64.facts +1600 -0
  7. data/facts/5.1/amazon-2-x86_64.facts +1432 -0
  8. data/facts/5.1/centos-10-x86_64.facts +1396 -0
  9. data/facts/5.1/centos-9-x86_64.facts +1537 -0
  10. data/facts/5.1/oraclelinux-10-x86_64.facts +1419 -0
  11. data/facts/5.1/oraclelinux-8-x86_64.facts +1545 -0
  12. data/facts/5.1/oraclelinux-9-x86_64.facts +1604 -0
  13. data/facts/5.1/redhat-10-x86_64.facts +1439 -0
  14. data/facts/5.1/redhat-8-x86_64.facts +1453 -0
  15. data/facts/5.1/redhat-9-x86_64.facts +1505 -0
  16. data/facts/5.1/rocky-10-x86_64.facts +1348 -0
  17. data/facts/5.1/rocky-8-x86_64.facts +1453 -0
  18. data/facts/5.1/rocky-9-x86_64.facts +1620 -0
  19. data/facts/5.1/windows-2016-x64.facts +525 -0
  20. data/facts/5.1/windows-2019-x64.facts +529 -0
  21. data/facts/5.1/windows-2022-x64.facts +531 -0
  22. data/facts/5.1/windows-2025-x64.facts +527 -0
  23. data/facts/scripts/gce_scrub_data/centos-6-x86_64.scrub.yaml +1 -1
  24. data/facts/scripts/gce_scrub_data/centos-7-x86_64.scrub.yaml +1 -1
  25. data/facts/scripts/gce_scrub_data/oraclelinux-6-x86_64.scrub.yaml +1 -1
  26. data/facts/scripts/gce_scrub_data/oraclelinux-7-x86_64.scrub.yaml +1 -1
  27. data/facts/scripts/gce_scrub_data/redhat-7-x86_64.scrub.yaml +1 -1
  28. data/facts/scripts/gce_scrub_data.rb +15 -15
  29. data/facts/scripts/get_facts.rb +3 -3
  30. data/lib/simp/rspec-puppet-facts.rb +84 -67
  31. data/lib/simp/version.rb +3 -1
  32. data/spec/acceptance/nodesets/{centos7.yml → almalinux10.yml} +5 -7
  33. data/spec/acceptance/nodesets/almalinux8.yml +1 -1
  34. data/spec/acceptance/nodesets/almalinux9.yml +1 -1
  35. data/spec/acceptance/nodesets/{centos8.yml → centos10.yml} +5 -7
  36. data/spec/acceptance/nodesets/centos9.yml +2 -2
  37. data/spec/acceptance/nodesets/oel10.yml +16 -0
  38. data/spec/acceptance/nodesets/oel8.yml +6 -13
  39. data/spec/acceptance/nodesets/oel9.yml +3 -2
  40. data/spec/acceptance/nodesets/{rhel7.yml → rhel10.yml} +5 -5
  41. data/spec/acceptance/nodesets/rhel8.yml +1 -1
  42. data/spec/acceptance/nodesets/rhel9.yml +1 -1
  43. data/spec/acceptance/nodesets/rocky10.yml +18 -0
  44. data/spec/acceptance/nodesets/rocky8.yml +2 -2
  45. data/spec/acceptance/nodesets/rocky9.yml +2 -2
  46. data/spec/acceptance/nodesets/win_2016.yml +1 -1
  47. data/spec/acceptance/nodesets/win_2019.yml +1 -1
  48. data/spec/acceptance/nodesets/win_2022.yml +1 -1
  49. data/spec/acceptance/nodesets/win_2025.yml +30 -0
  50. data/spec/acceptance/suites/default/00_default_spec.rb +21 -19
  51. data/spec/fixtures/metadata.json +6 -23
  52. data/spec/spec_helper_acceptance.rb +9 -52
  53. data/spec/unit/data_normalization_spec.rb +35 -0
  54. data/spec/unit/simp_rspec_puppet_facts_spec.rb +206 -0
  55. metadata +276 -236
  56. data/facts/Gemfile +0 -11
  57. data/facts/Vagrantfile +0 -236
  58. data/spec/acceptance/nodesets/centos7-vault.sh +0 -6
  59. data/spec/acceptance/nodesets/centos8-vault.sh +0 -8
  60. data/spec/acceptance/nodesets/oel7.yml +0 -23
  61. data/spec/data_normalization_spec.rb +0 -34
  62. data/spec/fixtures/metadata.json_with_missing_operatingsystem_support +0 -25
  63. data/spec/simp_rspec_puppet_facts_spec.rb +0 -198
@@ -0,0 +1,527 @@
1
+ {
2
+ "aio_agent_version": "8.23.1",
3
+ "architecture": "x64",
4
+ "dhcp_servers": {
5
+ "Ethernet": "10.0.2.2",
6
+ "system": "10.0.2.2"
7
+ },
8
+ "dmi": {
9
+ "manufacturer": "innotek GmbH",
10
+ "product": {
11
+ "name": "VirtualBox",
12
+ "serial_number": "VirtualBox-d902376b-d201-4e65-a422-babeb6fb100e",
13
+ "uuid": "D902376B-D201-4E65-A422-BABEB6FB100E"
14
+ }
15
+ },
16
+ "domain": "example.com",
17
+ "env_windows_installdir": "C:\\Program Files\\Puppet Labs\\Puppet",
18
+ "facterversion": "5.1.0",
19
+ "fips_enabled": false,
20
+ "fqdn": "foo.example.com",
21
+ "hardwareisa": "x64",
22
+ "hardwaremodel": "x86_64",
23
+ "hostname": "foo",
24
+ "hypervisors": {
25
+ "virtualbox": {
26
+ "revision": "170484",
27
+ "version": "7.2.2"
28
+ }
29
+ },
30
+ "id": "WIN\\vagrant",
31
+ "identity": {
32
+ "privileged": true,
33
+ "user": "WIN\\vagrant"
34
+ },
35
+ "init_systems": [
36
+ "rc"
37
+ ],
38
+ "interfaces": "Ethernet",
39
+ "ipaddress": "10.0.2.15",
40
+ "ipaddress6": "fd17:625c:f037:2:b660:3f70:3d7e:3219",
41
+ "ipaddress6_Ethernet": "fd17:625c:f037:2:b660:3f70:3d7e:3219",
42
+ "ipaddress_Ethernet": "10.0.2.15",
43
+ "is_pe": false,
44
+ "is_virtual": true,
45
+ "kernel": "windows",
46
+ "kernelmajversion": "10.0",
47
+ "kernelrelease": "10.0.26100",
48
+ "kernelversion": "10.0.26100",
49
+ "macaddress": "08:00:27:DB:18:1B",
50
+ "macaddress_Ethernet": "08:00:27:DB:18:1B",
51
+ "manufacturer": "innotek GmbH",
52
+ "memory": {
53
+ "system": {
54
+ "available": "569.68 MiB",
55
+ "available_bytes": 597352448,
56
+ "capacity": "71.92%",
57
+ "total": "1.98 GiB",
58
+ "total_bytes": 2127433728,
59
+ "used": "1.42 GiB",
60
+ "used_bytes": 1530081280
61
+ }
62
+ },
63
+ "memoryfree": "569.68 MiB",
64
+ "memoryfree_mb": 569.6796875,
65
+ "memorysize": "1.98 GiB",
66
+ "memorysize_mb": 2028.87890625,
67
+ "mtu_Ethernet": 1500,
68
+ "netmask": "255.255.0.0",
69
+ "netmask6": "ffff:ffff:ffff:ffff::",
70
+ "netmask6_Ethernet": "ffff:ffff:ffff:ffff::",
71
+ "netmask_Ethernet": "255.255.0.0",
72
+ "network": "10.0.2.0",
73
+ "network6": "fd17:625c:f037:2::",
74
+ "network6_Ethernet": "fd17:625c:f037:2::",
75
+ "network_Ethernet": "10.0.2.0",
76
+ "networking": {
77
+ "dhcp": "10.0.2.2",
78
+ "domain": "example.com",
79
+ "fqdn": "foo.example.com",
80
+ "hostname": "foo",
81
+ "interfaces": {
82
+ "Ethernet": {
83
+ "bindings": [
84
+ {
85
+ "address": "10.0.2.15",
86
+ "netmask": "255.255.0.0",
87
+ "network": "10.0.2.0"
88
+ }
89
+ ],
90
+ "bindings6": [
91
+ {
92
+ "address": "fd17:625c:f037:2:b660:3f70:3d7e:3219",
93
+ "netmask": "ffff:ffff:ffff:ffff::",
94
+ "network": "fd17:625c:f037:2::",
95
+ "scope6": "global"
96
+ },
97
+ {
98
+ "address": "fe80::db18:a49:79ba:bdc9",
99
+ "netmask": "ffff:ffff:ffff:ffff::",
100
+ "network": "fe80::",
101
+ "scope6": "link"
102
+ }
103
+ ],
104
+ "dhcp": "10.0.2.2",
105
+ "ip": "10.0.2.15",
106
+ "ip6": "fd17:625c:f037:2:b660:3f70:3d7e:3219",
107
+ "mac": "08:00:27:DB:18:1B",
108
+ "mtu": 1500,
109
+ "netmask": "255.255.0.0",
110
+ "netmask6": "ffff:ffff:ffff:ffff::",
111
+ "network": "10.0.2.0",
112
+ "network6": "fd17:625c:f037:2::",
113
+ "scope6": "global"
114
+ }
115
+ },
116
+ "ip": "10.0.2.15",
117
+ "ip6": "fd17:625c:f037:2:b660:3f70:3d7e:3219",
118
+ "mac": "08:00:27:DB:18:1B",
119
+ "mtu": 1500,
120
+ "netmask": "255.255.0.0",
121
+ "netmask6": "ffff:ffff:ffff:ffff::",
122
+ "network": "10.0.2.0",
123
+ "network6": "fd17:625c:f037:2::",
124
+ "primary": "Ethernet",
125
+ "scope6": "global"
126
+ },
127
+ "openssh_version": "9.5",
128
+ "operatingsystem": "windows",
129
+ "operatingsystemmajrelease": "2025",
130
+ "operatingsystemrelease": "2025",
131
+ "os": {
132
+ "architecture": "x64",
133
+ "family": "windows",
134
+ "hardware": "x86_64",
135
+ "name": "windows",
136
+ "release": {
137
+ "full": "2025",
138
+ "major": "2025"
139
+ },
140
+ "windows": {
141
+ "display_version": "24H2",
142
+ "edition_id": "ServerStandardEval",
143
+ "installation_type": "Server",
144
+ "product_name": "Windows Server 2025 Standard Evaluation",
145
+ "release_id": "24H2",
146
+ "system32": "C:\\WINDOWS\\system32"
147
+ }
148
+ },
149
+ "osfamily": "windows",
150
+ "package_provider": "windows",
151
+ "path": "C:\\Program Files\\Puppet Labs\\Puppet\\puppet\\bin;C:\\Program Files\\Puppet Labs\\Puppet\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Puppet Labs\\Puppet\\bin;C:\\Users\\vagrant\\AppData\\Local\\Microsoft\\WindowsApps;",
152
+ "physicalprocessorcount": 1,
153
+ "processor0": "AMD Ryzen 7 7700X 8-Core Processor ",
154
+ "processorcount": 2,
155
+ "processors": {
156
+ "cores": 2,
157
+ "count": 2,
158
+ "isa": "x64",
159
+ "models": [
160
+ "AMD Ryzen 7 7700X 8-Core Processor "
161
+ ],
162
+ "physicalcount": 1,
163
+ "threads": 1
164
+ },
165
+ "productname": "VirtualBox",
166
+ "puppet_environmentpath": "C:/ProgramData/PuppetLabs/code/environments",
167
+ "puppet_ruby_dir": "C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet",
168
+ "puppet_server": "puppet",
169
+ "puppet_settings": {
170
+ "agent": {
171
+ "agent_catalog_run_lockfile": "C:/ProgramData/PuppetLabs/puppet/cache/state/agent_catalog_run.lock",
172
+ "agent_disabled_lockfile": "C:/ProgramData/PuppetLabs/puppet/cache/state/agent_disabled.lock",
173
+ "allow_pson_serialization": "false",
174
+ "ca_port": "8140",
175
+ "ca_server": "puppet",
176
+ "classfile": "C:/ProgramData/PuppetLabs/puppet/cache/state/classes.txt",
177
+ "client_datadir": "C:/ProgramData/PuppetLabs/puppet/cache/client_data",
178
+ "clientbucketdir": "C:/ProgramData/PuppetLabs/puppet/cache/clientbucket",
179
+ "clientyamldir": "C:/ProgramData/PuppetLabs/puppet/cache/client_yaml",
180
+ "default_schedules": "true",
181
+ "deviceconfdir": "C:/ProgramData/PuppetLabs/puppet/etc/devices",
182
+ "fact_name_length_soft_limit": "2560",
183
+ "fact_value_length_soft_limit": "4096",
184
+ "graph": "false",
185
+ "graphdir": "C:/ProgramData/PuppetLabs/puppet/cache/state/graphs",
186
+ "http_extra_headers": "[]",
187
+ "ignoremissingtypes": "false",
188
+ "ignoreschedules": "false",
189
+ "include_legacy_facts": "false",
190
+ "lastrunfile": "C:/ProgramData/PuppetLabs/puppet/public/last_run_summary.yaml",
191
+ "lastrunreport": "C:/ProgramData/PuppetLabs/puppet/cache/state/last_run_report.yaml",
192
+ "maxwaitforcert": "Infinity",
193
+ "maxwaitforlock": "60",
194
+ "node_name_fact": "",
195
+ "node_name_value": "foo.example.com",
196
+ "noop": "false",
197
+ "number_of_facts_soft_limit": "10240",
198
+ "payload_soft_limit": "16777216",
199
+ "preferred_serialization_format": "json",
200
+ "publicdir": "C:/ProgramData/PuppetLabs/puppet/public",
201
+ "puppetdlog": "C:/ProgramData/PuppetLabs/puppet/var/log/puppetd.log",
202
+ "report": "true",
203
+ "report_include_system_store": "false",
204
+ "report_port": "8140",
205
+ "report_server": "puppet",
206
+ "resourcefile": "C:/ProgramData/PuppetLabs/puppet/cache/state/resources.txt",
207
+ "resubmit_facts": "false",
208
+ "runinterval": "1800",
209
+ "runtimeout": "3600",
210
+ "server": "puppet",
211
+ "server_list": "[]",
212
+ "splay": "false",
213
+ "splaylimit": "1800",
214
+ "srv_domain": "example.com",
215
+ "statefile": "C:/ProgramData/PuppetLabs/puppet/cache/state/state.yaml",
216
+ "statettl": "2764800",
217
+ "top_level_facts_soft_limit": "512",
218
+ "transactionstorefile": "C:/ProgramData/PuppetLabs/puppet/cache/state/transactionstore.yaml",
219
+ "use_cached_catalog": "false",
220
+ "use_srv_records": "false",
221
+ "usecacheonfailure": "true",
222
+ "waitforcert": "120",
223
+ "waitforlock": "0",
224
+ "write_catalog_summary": "true"
225
+ },
226
+ "application": {
227
+ "config": "C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf",
228
+ "config_file_name": "puppet.conf",
229
+ "pidfile": "C:/ProgramData/PuppetLabs/puppet/var/run/application.pid",
230
+ "sourceaddress": ""
231
+ },
232
+ "ca": {
233
+ "allow_duplicate_certs": "false",
234
+ "autosign": "C:/ProgramData/PuppetLabs/puppet/etc/autosign.conf",
235
+ "ca_name": "Puppet CA: foo.example.com",
236
+ "ca_refresh_interval": "86400",
237
+ "ca_ttl": "157680000",
238
+ "cacert": "C:/Users/vagrant/ca_crt.pem",
239
+ "cacrl": "C:/Users/vagrant/ca_crl.pem",
240
+ "cadir": "C:/Users/vagrant",
241
+ "cakey": "C:/Users/vagrant/ca_key.pem",
242
+ "capub": "C:/Users/vagrant/ca_pub.pem",
243
+ "cert_inventory": "C:/Users/vagrant/inventory.txt",
244
+ "crl_refresh_interval": "86400",
245
+ "csrdir": "C:/Users/vagrant/requests",
246
+ "hostcert_renewal_interval": "2592000",
247
+ "keylength": "4096",
248
+ "serial": "C:/Users/vagrant/serial",
249
+ "signeddir": "C:/Users/vagrant/signed"
250
+ },
251
+ "device": {
252
+ "deviceconfig": "C:/ProgramData/PuppetLabs/puppet/etc/device.conf",
253
+ "devicedir": "C:/ProgramData/PuppetLabs/puppet/cache/devices"
254
+ },
255
+ "environment": {
256
+ "config_version": "",
257
+ "manifest": "C:/ProgramData/PuppetLabs/code/environments/production/manifests",
258
+ "modulepath": "C:/ProgramData/PuppetLabs/code/environments/production/modules;C:/ProgramData/PuppetLabs/code/modules;C:/Program Files/Puppet Labs/Puppet/puppet/modules"
259
+ },
260
+ "ldap": {
261
+ "ldapattrs": "all",
262
+ "ldapbase": "",
263
+ "ldapclassattrs": "puppetclass",
264
+ "ldapparentattr": "parentnode",
265
+ "ldappassword": "",
266
+ "ldapport": "389",
267
+ "ldapserver": "ldap",
268
+ "ldapssl": "false",
269
+ "ldapstackedattrs": "puppetvar",
270
+ "ldapstring": "(&(objectclass=puppetClient)(cn=%s))",
271
+ "ldaptls": "false",
272
+ "ldapuser": ""
273
+ },
274
+ "main": {
275
+ "always_retry_plugins": "true",
276
+ "autoflush": "true",
277
+ "binder_config": "",
278
+ "ca_fingerprint": "",
279
+ "catalog_cache_terminus": "",
280
+ "catalog_terminus": "compiler",
281
+ "certdir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs",
282
+ "certificate_revocation": "chain",
283
+ "certname": "foo.example.com",
284
+ "ciphers": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256",
285
+ "codedir": "C:/ProgramData/PuppetLabs/code",
286
+ "color": "ansi",
287
+ "confdir": "C:/ProgramData/PuppetLabs/puppet/etc",
288
+ "csr_attributes": "C:/ProgramData/PuppetLabs/puppet/etc/csr_attributes.yaml",
289
+ "daemonize": "false",
290
+ "data_binding_terminus": "hiera",
291
+ "default_file_terminus": "rest",
292
+ "diff": "",
293
+ "diff_args": "-u",
294
+ "digest_algorithm": "sha256",
295
+ "disable_i18n": "true",
296
+ "disable_warnings": "[]",
297
+ "dns_alt_names": "",
298
+ "environment": "production",
299
+ "environment_data_provider": "",
300
+ "environment_timeout": "0",
301
+ "environmentpath": "C:/ProgramData/PuppetLabs/code/environments",
302
+ "external_nodes": "none",
303
+ "factpath": "C:/ProgramData/PuppetLabs/puppet/cache/lib/facter;C:/ProgramData/PuppetLabs/puppet/cache/facts",
304
+ "facts_terminus": "facter",
305
+ "filetimeout": "15",
306
+ "freeze_main": "false",
307
+ "genconfig": "false",
308
+ "genmanifest": "false",
309
+ "hiera_config": "C:/ProgramData/PuppetLabs/puppet/etc/hiera.yaml",
310
+ "hostcert": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/foo.example.com.pem",
311
+ "hostcrl": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem",
312
+ "hostcsr": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests/foo.example.com.pem",
313
+ "hostprivkey": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/foo.example.com.pem",
314
+ "hostpubkey": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/foo.example.com.pem",
315
+ "http_connect_timeout": "120",
316
+ "http_debug": "false",
317
+ "http_keepalive_timeout": "4",
318
+ "http_proxy_host": "none",
319
+ "http_proxy_password": "none",
320
+ "http_proxy_port": "3128",
321
+ "http_proxy_user": "none",
322
+ "http_read_timeout": "600",
323
+ "http_user_agent": "Puppet/8.23.1 Ruby/3.2.9-p265 (x64-mingw32)",
324
+ "ignore_plugin_errors": "false",
325
+ "key_type": "rsa",
326
+ "libdir": "C:/ProgramData/PuppetLabs/puppet/cache/lib",
327
+ "localcacert": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/ca.pem",
328
+ "localedest": "C:/ProgramData/PuppetLabs/puppet/cache/locales",
329
+ "localesource": "puppet:///locales",
330
+ "location_trusted": "false",
331
+ "log_level": "notice",
332
+ "logdest": "",
333
+ "logdir": "C:/ProgramData/PuppetLabs/puppet/var/log",
334
+ "manage_internal_file_permissions": "false",
335
+ "maximum_uid": "4294967290",
336
+ "merge_dependency_warnings": "false",
337
+ "mkusers": "false",
338
+ "name": "facts",
339
+ "named_curve": "prime256v1",
340
+ "no_proxy": "localhost, 127.0.0.1",
341
+ "node_cache_terminus": "",
342
+ "node_terminus": "plain",
343
+ "onetime": "false",
344
+ "passfile": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/private/password",
345
+ "path": "none",
346
+ "plugindest": "C:/ProgramData/PuppetLabs/puppet/cache/lib",
347
+ "pluginfactdest": "C:/ProgramData/PuppetLabs/puppet/cache/facts.d",
348
+ "pluginfactsource": "puppet:///pluginfacts",
349
+ "pluginsignore": ".svn CVS .git .hg",
350
+ "pluginsource": "puppet:///plugins",
351
+ "pluginsync": "true",
352
+ "postrun_command": "",
353
+ "prerun_command": "",
354
+ "preview_outputdir": "C:/ProgramData/PuppetLabs/puppet/cache/preview",
355
+ "priority": "",
356
+ "privatedir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/private",
357
+ "privatekeydir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys",
358
+ "profile": "false",
359
+ "publickeydir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys",
360
+ "puppet_trace": "false",
361
+ "report_configured_environmentpath": "true",
362
+ "requestdir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests",
363
+ "rich_data": "true",
364
+ "route_file": "C:/ProgramData/PuppetLabs/puppet/etc/routes.yaml",
365
+ "rundir": "C:/ProgramData/PuppetLabs/puppet/var/run",
366
+ "settings_catalog": "true",
367
+ "show_diff": "false",
368
+ "skip_logging_catalog_request_destination": "false",
369
+ "ssl_lockfile": "C:/ProgramData/PuppetLabs/puppet/etc/ssl/ssl.lock",
370
+ "ssl_trust_store": "",
371
+ "ssldir": "C:/ProgramData/PuppetLabs/puppet/etc/ssl",
372
+ "statedir": "C:/ProgramData/PuppetLabs/puppet/cache/state",
373
+ "static_catalogs": "true",
374
+ "strict": "error",
375
+ "strict_environment_mode": "false",
376
+ "supported_checksum_types": "[\"sha256\", \"sha384\", \"sha512\", \"sha224\", \"md5\"]",
377
+ "syslogfacility": "daemon",
378
+ "trace": "false",
379
+ "trusted_external_command": "",
380
+ "use_last_environment": "true",
381
+ "vardir": "C:/ProgramData/PuppetLabs/puppet/cache",
382
+ "versioned_environment_dirs": "false"
383
+ },
384
+ "master": {
385
+ "basemodulepath": "C:/ProgramData/PuppetLabs/code/modules;C:/Program Files/Puppet Labs/Puppet/puppet/modules",
386
+ "bucketdir": "C:/ProgramData/PuppetLabs/puppet/cache/bucket",
387
+ "code": "",
388
+ "default_manifest": "./manifests",
389
+ "disable_per_environment_manifest": "false",
390
+ "exclude_unchanged_resources": "true",
391
+ "fileserverconfig": "C:/ProgramData/PuppetLabs/puppet/etc/fileserver.conf",
392
+ "group": "puppet",
393
+ "masterport": "8140",
394
+ "reportdir": "C:/ProgramData/PuppetLabs/puppet/cache/reports",
395
+ "reports": "store",
396
+ "reporturl": "http://localhost:3000/reports/upload",
397
+ "server_datadir": "C:/ProgramData/PuppetLabs/puppet/cache/server_data",
398
+ "serverport": "8140",
399
+ "ssl_client_header": "HTTP_X_CLIENT_DN",
400
+ "ssl_client_verify_header": "HTTP_X_CLIENT_VERIFY",
401
+ "storeconfigs": "false",
402
+ "storeconfigs_backend": "puppetdb",
403
+ "trusted_oid_mapping_file": "C:/ProgramData/PuppetLabs/puppet/etc/custom_trusted_oid_mapping.yaml",
404
+ "user": "puppet",
405
+ "vendormoduledir": "C:\\Program Files\\Puppet Labs\\Puppet\\puppet\\vendor_modules",
406
+ "yamldir": "C:/ProgramData/PuppetLabs/puppet/cache/yaml"
407
+ },
408
+ "module_tool": {
409
+ "forge_authorization": "",
410
+ "module_groups": "",
411
+ "module_repository": "https://forgeapi.puppet.com",
412
+ "module_working_dir": "C:/Users/vagrant/AppData/Local/Temp"
413
+ },
414
+ "parser": {
415
+ "max_deprecations": "10",
416
+ "max_errors": "10",
417
+ "max_warnings": "10",
418
+ "strict_variables": "true",
419
+ "tasks": "false"
420
+ },
421
+ "puppetdoc": {
422
+ "document_all": "false"
423
+ },
424
+ "server": {
425
+ "basemodulepath": "C:/ProgramData/PuppetLabs/code/modules;C:/Program Files/Puppet Labs/Puppet/puppet/modules",
426
+ "bucketdir": "C:/ProgramData/PuppetLabs/puppet/cache/bucket",
427
+ "code": "",
428
+ "default_manifest": "./manifests",
429
+ "disable_per_environment_manifest": "false",
430
+ "exclude_unchanged_resources": "true",
431
+ "fileserverconfig": "C:/ProgramData/PuppetLabs/puppet/etc/fileserver.conf",
432
+ "group": "puppet",
433
+ "masterport": "8140",
434
+ "reportdir": "C:/ProgramData/PuppetLabs/puppet/cache/reports",
435
+ "reports": "store",
436
+ "reporturl": "http://localhost:3000/reports/upload",
437
+ "server_datadir": "C:/ProgramData/PuppetLabs/puppet/cache/server_data",
438
+ "serverport": "8140",
439
+ "ssl_client_header": "HTTP_X_CLIENT_DN",
440
+ "ssl_client_verify_header": "HTTP_X_CLIENT_VERIFY",
441
+ "storeconfigs": "false",
442
+ "storeconfigs_backend": "puppetdb",
443
+ "trusted_oid_mapping_file": "C:/ProgramData/PuppetLabs/puppet/etc/custom_trusted_oid_mapping.yaml",
444
+ "user": "puppet",
445
+ "vendormoduledir": "C:\\Program Files\\Puppet Labs\\Puppet\\puppet\\vendor_modules",
446
+ "yamldir": "C:/ProgramData/PuppetLabs/puppet/cache/yaml"
447
+ },
448
+ "transaction": {
449
+ "evaltrace": "false",
450
+ "preprocess_deferred": "false",
451
+ "skip_tags": "",
452
+ "summarize": "false",
453
+ "tags": ""
454
+ }
455
+ },
456
+ "puppet_vardir": "C:/ProgramData/PuppetLabs/puppet/cache",
457
+ "puppetversion": "8.23.1",
458
+ "reboot_required": false,
459
+ "ruby": {
460
+ "platform": "x64-mingw32",
461
+ "sitedir": "C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/site_ruby/3.2.0",
462
+ "version": "3.2.9"
463
+ },
464
+ "rubyplatform": "x64-mingw32",
465
+ "rubysitedir": "C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/site_ruby/3.2.0",
466
+ "rubyversion": "3.2.9",
467
+ "scope6": "global",
468
+ "scope6_Ethernet": "global",
469
+ "serialnumber": "VirtualBox-d902376b-d201-4e65-a422-babeb6fb100e",
470
+ "service_provider": "windows",
471
+ "ssh": {
472
+ "ecdsa": {
473
+ "fingerprints": {
474
+ "sha1": "SSHFP 3 1 9b114a2c6ab6499d0e8b88944479387d86ca3008",
475
+ "sha256": "SSHFP 3 2 ad740ec83d1331c9f6bd5677bac2b2c15d79a7fcd30248784ccdcbe0dd5ab9ec"
476
+ },
477
+ "key": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPN3Ql8TDtWa2lkFG1z0wT0LHI5FIovSwDnDdgzI6PzFWGP5ODbyzCbTRIajXsp/wlzlnDfXNtxEDSQyXOiATbY=",
478
+ "type": "ecdsa-sha2-nistp256"
479
+ },
480
+ "ed25519": {
481
+ "fingerprints": {
482
+ "sha1": "SSHFP 4 1 38bff2040f1f60f61aa7a1c75eae81fbbaaf3b8c",
483
+ "sha256": "SSHFP 4 2 ef33c9d3131a1d46e0957e8389320a0f1dda6cdb1313dbbe757678dd6bb573e6"
484
+ },
485
+ "key": "AAAAC3NzaC1lZDI1NTE5AAAAIOOX8Op/xk4LDU2VCZSF96hYaDGuRO3CY5RjwnlAH/Zy",
486
+ "type": "ssh-ed25519"
487
+ },
488
+ "rsa": {
489
+ "fingerprints": {
490
+ "sha1": "SSHFP 1 1 e0cf7bd6c1693859c2aca3ed487a00b909c8e331",
491
+ "sha256": "SSHFP 1 2 168c5816817b1c6ce56302b3899a6e2a9bccfc76366ce7affa357af085c7a6ae"
492
+ },
493
+ "key": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDJ2rNFn6sIcTUvnPsC5zerJfhC2eqe38GhftKAkyJ1PpcRuRtpsd7G4Z3y+joy4RrbG6i4bbgGekLXHd3RvciLimC+mCPMeP9TRURGKCSvZ8mL5zcJyZ2gU26btoFcr1+/gh49Nkby72kIa0Y//MK39qYnsS84EJrv9wWt13TJQ9LZNY3G+L3ejVBHronQC5Xz3qfZevc7+sDAZHfYjQX5TyoIJnW/S3PuAPbMJfYuSSEj0p3cNgSAd0HTSQBnEw3v85Oyg0TIZ04Ud7OS3nRnKMJiY0zOHiFgjz7foOdXMjgGuMYzKYf7tBujmOMjUp4XAA4swLxOxmycFm2uyTU2kuXvkxNtzislFy/7zpEWKwYgu74YSsxi/HpbmkcnwuAiYJo0eR2atvA6JESR+d71okITNjzLgAGitZXrOCFQypg0/dqEPEX9KwP1ELxh7xWqUcsomh3+HcTu7CgQE0MdBKzBNtraW3i56IcohT32pdIvL73oq0KQmbp8WonuqRc=",
494
+ "type": "ssh-rsa"
495
+ }
496
+ },
497
+ "ssh_host_keys": [
498
+ "__PROGRAMDATA__\\ssh/ssh_host_rsa_key",
499
+ "__PROGRAMDATA__\\ssh/ssh_host_ecdsa_key",
500
+ "__PROGRAMDATA__\\ssh/ssh_host_ed25519_key"
501
+ ],
502
+ "sshecdsakey": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPN3Ql8TDtWa2lkFG1z0wT0LHI5FIovSwDnDdgzI6PzFWGP5ODbyzCbTRIajXsp/wlzlnDfXNtxEDSQyXOiATbY=",
503
+ "sshed25519key": "AAAAC3NzaC1lZDI1NTE5AAAAIOOX8Op/xk4LDU2VCZSF96hYaDGuRO3CY5RjwnlAH/Zy",
504
+ "sshfp_ecdsa": "SSHFP 3 1 9b114a2c6ab6499d0e8b88944479387d86ca3008\nSSHFP 3 2 ad740ec83d1331c9f6bd5677bac2b2c15d79a7fcd30248784ccdcbe0dd5ab9ec",
505
+ "sshfp_ed25519": "SSHFP 4 1 38bff2040f1f60f61aa7a1c75eae81fbbaaf3b8c\nSSHFP 4 2 ef33c9d3131a1d46e0957e8389320a0f1dda6cdb1313dbbe757678dd6bb573e6",
506
+ "sshfp_rsa": "SSHFP 1 1 e0cf7bd6c1693859c2aca3ed487a00b909c8e331\nSSHFP 1 2 168c5816817b1c6ce56302b3899a6e2a9bccfc76366ce7affa357af085c7a6ae",
507
+ "sshrsakey": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDJ2rNFn6sIcTUvnPsC5zerJfhC2eqe38GhftKAkyJ1PpcRuRtpsd7G4Z3y+joy4RrbG6i4bbgGekLXHd3RvciLimC+mCPMeP9TRURGKCSvZ8mL5zcJyZ2gU26btoFcr1+/gh49Nkby72kIa0Y//MK39qYnsS84EJrv9wWt13TJQ9LZNY3G+L3ejVBHronQC5Xz3qfZevc7+sDAZHfYjQX5TyoIJnW/S3PuAPbMJfYuSSEj0p3cNgSAd0HTSQBnEw3v85Oyg0TIZ04Ud7OS3nRnKMJiY0zOHiFgjz7foOdXMjgGuMYzKYf7tBujmOMjUp4XAA4swLxOxmycFm2uyTU2kuXvkxNtzislFy/7zpEWKwYgu74YSsxi/HpbmkcnwuAiYJo0eR2atvA6JESR+d71okITNjzLgAGitZXrOCFQypg0/dqEPEX9KwP1ELxh7xWqUcsomh3+HcTu7CgQE0MdBKzBNtraW3i56IcohT32pdIvL73oq0KQmbp8WonuqRc=",
508
+ "system32": "C:\\WINDOWS\\system32",
509
+ "system_uptime": {
510
+ "days": 0,
511
+ "hours": 0,
512
+ "seconds": 2341,
513
+ "uptime": "0:39 hours"
514
+ },
515
+ "timezone": "UTC",
516
+ "uptime": "0:39 hours",
517
+ "uptime_days": 0,
518
+ "uptime_hours": 0,
519
+ "uptime_seconds": 2341,
520
+ "uuid": "D902376B-D201-4E65-A422-BABEB6FB100E",
521
+ "virtual": "virtualbox",
522
+ "windows_display_version": "24H2",
523
+ "windows_edition_id": "ServerStandardEval",
524
+ "windows_installation_type": "Server",
525
+ "windows_product_name": "Windows Server 2025 Standard Evaluation",
526
+ "windows_release_id": "24H2"
527
+ }
@@ -1 +1 @@
1
- facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
1
+ redhat-6-x86_64.scrub.yaml
@@ -1 +1 @@
1
- facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
1
+ redhat-6-x86_64.scrub.yaml
@@ -1 +1 @@
1
- facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
1
+ redhat-6-x86_64.scrub.yaml
@@ -1 +1 @@
1
- facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
1
+ redhat-6-x86_64.scrub.yaml
@@ -1 +1 @@
1
- facts/scripts/gce_scrub_data/redhat-6-x86_64.scrub.yaml
1
+ redhat-6-x86_64.scrub.yaml
@@ -2,20 +2,20 @@ require 'yaml'
2
2
  require 'json'
3
3
 
4
4
  # A cowardly Heap merge that only overwrites keys that already exist
5
- def creep_merge( j, o )
5
+ def creep_merge(j, o)
6
6
  result = nil
7
7
  if o.is_a? Hash
8
- o.keys.each do |k|
8
+ o.each_key do |k|
9
9
  puts "== k: #{k} | #{k.class} | j: #{j.class}" if ENV['VERBOSE'] == 'yes'
10
10
  if j.is_a?(Hash)
11
- unless j.key?(k)
11
+ if j.key?(k)
12
+ j[k] = creep_merge(j[k], o[k])
13
+ else
12
14
  warn "!!!!!!!!! WARNING NO key '#{k}'"
13
15
  if ENV['PRY'] == 'yes'
14
16
  require 'pry'
15
- binding.pry
17
+ binding.pry # rubocop:disable Lint/Debugger
16
18
  end
17
- else
18
- j[k] = creep_merge(j[k], o[k])
19
19
  end
20
20
  else
21
21
  j = o[k]
@@ -29,21 +29,21 @@ def creep_merge( j, o )
29
29
  end
30
30
 
31
31
  def scrub_data(f)
32
- _ff = File.basename(f).sub(/\.facts/,'.scrub.yaml')
33
- ff = File.expand_path( "gce_scrub_data/#{_ff}", File.dirname(__FILE__))
32
+ scrub_ff = File.basename(f).sub('.facts', '.scrub.yaml')
33
+ ff = File.expand_path("gce_scrub_data/#{scrub_ff}", File.dirname(__FILE__))
34
34
  scrub = YAML.load_file ff
35
35
  data = JSON.parse(File.read(f))
36
- ff = "#{f}.yaml"
37
- File.open(ff,'w'){|fd| fd.puts data.to_yaml }
38
- fb = f.sub(/.facts$/,'.facts.bak')
36
+ ff = "#{f}.yaml"
37
+ File.open(ff, 'w') { |fd| fd.puts data.to_yaml }
38
+ fb = f.sub(%r{.facts$}, '.facts.bak')
39
39
  unless File.exist? fb
40
- File.open(fb,'w'){|fd| fd.puts data}
40
+ File.open(fb, 'w') { |fd| fd.puts data }
41
41
  warn "== wrote '#{fb}'"
42
42
  end
43
43
  warn "== wrote '#{ff}'"
44
- scrubbed_data = creep_merge( data, scrub )
45
- scrubbed_data.fetch('gce',{}).fetch('project',{}).fetch('attributes',{}).fetch('sshKeys',[]).delete_if{|x| x =~ /chris_tessmer/}
46
- File.open(f,'w'){|fd| fd.puts JSON.pretty_generate(scrubbed_data)}
44
+ scrubbed_data = creep_merge(data, scrub)
45
+ scrubbed_data.fetch('gce', {}).fetch('project', {}).fetch('attributes', {}).fetch('sshKeys', []).delete_if { |x| x.include?('chris_tessmer') }
46
+ File.open(f, 'w') { |fd| fd.puts JSON.pretty_generate(scrubbed_data) }
47
47
  warn "== wrote '#{f}'"
48
48
  end
49
49
 
@@ -2,16 +2,16 @@ require 'puppet'
2
2
  require 'json'
3
3
  require 'facter'
4
4
 
5
- ENV.fetch('FACTERLIB').split(':').each{|x| Facter.search x }
5
+ ENV.fetch('FACTERLIB').split(':').each { |x| Facter.search x }
6
6
 
7
7
  Puppet.initialize_settings
8
8
  Facter.loadfacts
9
9
 
10
10
  data = Facter.collection.to_hash
11
11
  facter_major_ver = Facter.version.split('.').first
12
- if ['1','2'].include? facter_major_ver
12
+ if ['1', '2'].include? facter_major_ver
13
13
  facts = data
14
- elsif ['1','2'].include? facter_major_ver
14
+ elsif ['1', '2'].include? facter_major_ver
15
15
  facts = data['values']
16
16
  end
17
17
  jj JSON.parse facts.to_json