onceover 3.19.2 → 3.20.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b79a11b26d7a5dda46fa393b735200513381906e01ec25c4b79a86a8d4661671
4
- data.tar.gz: 33db007020dbaf216fcbfe243295e14a98915f532b8e50d1e8568265a7ca6727
3
+ metadata.gz: 2811ab38a0c86a251a20d2a95ad90781aad02860f5c914c7b8390999514ac633
4
+ data.tar.gz: 912c30b4f6269bdb34ea097bc8f8594fc53e41b7ac279fb9cb1c3c921ec53966
5
5
  SHA512:
6
- metadata.gz: f02b8c494b5185124e21b47aba9c2618bb3f6a08f7b2de6a9e70e48ef018ae8528d00aee814b7712ec7a2b5b9a72616f79400882171086f0f96fa0d9ff0a0e58
7
- data.tar.gz: 6f1a0e0ea544f357514fbb56328b3a494caaf7e3dc33b96812766bd866ced3503b399a8aca1480ff6a253fef79e5284d4a27e1ecef4800eddf2ac54520286f82
6
+ metadata.gz: 46aadcc7dff48722a888c12e1508ac055060ae7408277b5fc25ad6abdfb56996ed93c63445ddfa7d714026512a87dc8f5df73d6618c4ad7c44ab9d76fefdbec2
7
+ data.tar.gz: f0a9c6fa5c62f1f0e2b50a3a688bd476f7c6f8462dccc9c3ee4a484b1ff287172974ca24f38ff55dbbb19c839b36fc6eaf1b150c7beb1b5f8eafc84096c35f7b
data/README.md CHANGED
@@ -330,6 +330,18 @@ puppet facts > fact_set_name.json
330
330
 
331
331
  Its recommended to run this on each of the types of nodes that you run in your infrastructure to have good coverage.
332
332
 
333
+ If you are using [Trusted Facts](#trusted-facts) or [Trusted External Data](#trusted-external-data) and can use the [PE client tools](https://puppet.com/docs/pe/latest/installing_pe_client_tools.html) you can generate a factset which contains this information by running:
334
+
335
+ ```shell
336
+ puppet facts --terminus puppetdb > fact_set_name.json
337
+ ```
338
+
339
+ or
340
+
341
+ ```shell
342
+ puppet facts --terminus puppetdb <node certname> > fact_set_name.json
343
+ ```
344
+
333
345
  Factsets are named based on their filename, i.e. `myfactset` in `onceover.yaml` refers `spec/factsets/myfactset.json`
334
346
 
335
347
  #### Trusted Facts
@@ -351,6 +363,73 @@ You can add trusted facts to the factsets by creating a new section called trust
351
363
 
352
364
  Notice that the `extensions` part is implied. The first fact in that example translates to `$trusted['extensions']['pp_role']` in Puppet code.
353
365
 
366
+ Alternatively, if you generated your factset using the PE client tools your trusted facts will be nested under the **values** hash. For example:
367
+
368
+ ```json
369
+ {
370
+ "name": "node.puppetlabs.net",
371
+ "values": {
372
+ "aio_agent_build": "1.10.4",
373
+ "aio_agent_version": "1.10.4",
374
+ "architecture": "x86_64",
375
+ "trusted": {
376
+ "extensions": {
377
+ "pp_role": "agent",
378
+ "pp_datacenter": "puppet"
379
+ }
380
+ }
381
+ ```
382
+
383
+ In this case, you're all set and onceover will auto-magically pick those up for you.
384
+
385
+ **Note**: The top level `trusted` hash takes precidence over the `trusted[extensions]` hash nested under `values`. Meaning that if you have any specified at the top level, any nested ones will not be considered. So pick **ONE** method and stick with that.
386
+
387
+ #### Trusted External Data
388
+
389
+ **Note:** This feature requires `rspec-puppet` >= 2.8.0.
390
+
391
+ You can add trusted external data to the factsets by creating a new section called trusted_external:
392
+
393
+ ```json
394
+ {
395
+ "name": "node.puppetlabs.net",
396
+ "trusted_external": {
397
+ "example_forager": {
398
+ "globalRegion": "EMEA",
399
+ "serverOwner": "John Doe"
400
+ }
401
+ },
402
+ "values": {
403
+ "aio_agent_build": "1.10.4",
404
+ "aio_agent_version": "1.10.4",
405
+ "architecture": "x86_64",
406
+ ```
407
+
408
+ Notice that the `external` part is implied, though the foragers name will still need to be provided. The first fact in that example translates to `$trusted['external']['example_forager']['globalRegion']` in Puppet code.
409
+
410
+ Alternatively, if you generated your factset using the PE client tools your trusted external data will be nested under the **values** hash. For example:
411
+
412
+ ```json
413
+ {
414
+ "name": "node.puppetlabs.net",
415
+ "values": {
416
+ "aio_agent_build": "1.10.4",
417
+ "aio_agent_version": "1.10.4",
418
+ "architecture": "x86_64",
419
+ "trusted": {
420
+ "external": {
421
+ "example_forager": {
422
+ "globalRegion": "EMEA",
423
+ "serverOwner": "John Doe"
424
+ }
425
+ }
426
+ }
427
+ ```
428
+
429
+ In this case, you're all set and onceover will auto-magically pick those up for you.
430
+
431
+ **Note**: The top level `trusted_external` hash takes precidence over the `trusted[external]` hash nested under `values`. Meaning that if you have any specified at the top level, any nested ones will not be considered. So pick **ONE** method and stick with that.
432
+
354
433
  ### Hiera
355
434
 
356
435
  If you have hiera data inside your controlrepo (or somewhere else) `onceover` can be configured to use it.
@@ -587,10 +666,12 @@ require 'spec_helper'
587
666
  require 'onceover/controlrepo'
588
667
  require 'helpers/shared_examples'
589
668
 
590
- Onceover::Controlrepo.new.spec_tests do |class_name,node_name,facts,pre_conditions|
669
+ Onceover::Controlrepo.new.spec_tests do |class_name, node_name, facts, trusted_facts, trusted_external_data, pre_conditions|
591
670
  describe class_name do
592
671
  context "on #{node_name}" do
593
672
  let(:facts) { facts }
673
+ let(:trusted_facts) { trusted_facts }
674
+ let(:trusted_external_data) { trusted_external_data }
594
675
  let(:pre_condition) { pre_conditions }
595
676
 
596
677
  it_behaves_like 'soe'
data/Rakefile CHANGED
@@ -2,6 +2,7 @@ require 'rubygems/tasks'
2
2
  require 'rspec/core/rake_task'
3
3
  require 'cucumber/rake/task'
4
4
  require 'rubocop/rake_task'
5
+ require 'puppet/version'
5
6
  Gem::Tasks.new
6
7
 
7
8
  def windows?
@@ -18,7 +19,20 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
18
19
  t.rspec_opts = '--pattern spec/acceptance/**/*_spec.rb'
19
20
  end
20
21
 
21
- Cucumber::Rake::Task.new
22
+ # Cucumber task that intelligently skips test tagged with a minimum puppet
23
+ # version in the format "@puppet6"
24
+ Cucumber::Rake::Task.new(:cucumber) do |t|
25
+ major_version = Gem::Version.new(Puppet.version).segments[0]
26
+
27
+ # Create a list of tags to skip based on the next 3 major versions
28
+ skip_tags = ((major_version + 1)..(major_version + 3)).map { |v| "@puppet#{v}"}
29
+
30
+ # Generate logic string
31
+ skip_string = "not #{skip_tags.join(' and not ')}"
32
+
33
+ t.cucumber_opts = "--tags \"#{skip_string}\"" # Any valid command line option can go here.
34
+ end
35
+
22
36
 
23
37
  task default: :full_tests
24
38
 
@@ -5,15 +5,44 @@ Feature: Handle factsets properly
5
5
  Background:
6
6
  Given onceover executable
7
7
 
8
- Scenario: Setecting existing factsets
8
+ Scenario: Selecting existing factsets
9
9
  Given control repo "factsets"
10
10
  When I run onceover command "init"
11
11
  Then the config should contain "centos_with_env"
12
12
 
13
13
  # This needs to be tested because an environment fact, if not handled, makes
14
- # compilation fail becaiuse it breaks all of the workarounds that have been
14
+ # compilation fail because it breaks all of the workarounds that have been
15
15
  # put in place within rspec-puppet for the environment
16
- Scenario: Run with a factsent containing an environment facts
16
+ @puppet6
17
+ Scenario: Run with a factset containing an environment facts
17
18
  Given existing control repo "factsets"
18
- When I run onceover command "run spec"
19
+ When I run onceover command "run spec" with class "role::example"
19
20
  Then I should not see any errors
21
+
22
+ @puppet6
23
+ Scenario: Run trusted_extensions tests on nodes where pp_datacenter is PDK
24
+ Given existing control repo "factsets"
25
+ When I run onceover command "run spec" with class "role::trusted_extensions" on nodes "centos7_trusted_extensions_top,centos7_trusted_extensions_nested"
26
+ Then I should not see any errors
27
+
28
+ # Spec tests should only pass on the centos7_trusted_extensions_top and
29
+ # centos7_trusted_extensions_nested factsets. The rest should fail
30
+ @puppet6
31
+ Scenario: Run trusted_extensions tests on nodes where pp_datacenter is not set
32
+ Given existing control repo "factsets"
33
+ When I run onceover command "run spec" with class "role::trusted_extensions"
34
+ Then I should see error with message pattern "Evaluation Error: Error while evaluating a Function Call, pp_datacenter is not set to PDX"
35
+
36
+ @puppet6
37
+ Scenario: Run trusted_external tests on nodes where $trusted['external']['example']['foo'] is set to 'bar'
38
+ Given existing control repo "factsets"
39
+ When I run onceover command "run spec" with class "role::trusted_external" on nodes "centos7_trusted_external_top,centos7_trusted_external_nested"
40
+ Then I should not see any errors
41
+
42
+ # Spec tests should only pass on the centos7_trusted_externalq_top and
43
+ # centos7_trusted_external_nested factsets. The rest should fail
44
+ @puppet6
45
+ Scenario: Run trusted_external tests on nodes where $trusted['external'] is not specified
46
+ Given existing control repo "factsets"
47
+ When I run onceover command "run spec" with class "role::trusted_external"
48
+ Then I should see error with message pattern "Evaluation Error: Operator \'\[\]\' is not applicable to an Undef Value."
@@ -39,6 +39,12 @@ When(/^I run onceover command "([^"]*)" with class "([^"]*)"$/) do |command, cl
39
39
  @cmd.run
40
40
  end
41
41
 
42
+ When(/^I run onceover command "([^"]*)" with class "([^"]*)" on nodes "([^"]*)"$/) do |command, cls, nodes|
43
+ @cmd.command = "#{command} --classes #{cls} --nodes #{nodes}"
44
+ log(@cmd)
45
+ @cmd.run
46
+ end
47
+
42
48
  # The below can be used to skip tests if they only work on one os
43
49
  When(/^test osfamily is "(\w*)"$/) do |osfamily|
44
50
  require 'facter'
@@ -76,6 +76,10 @@ class Onceover
76
76
  @@existing_controlrepo.facts(filter, 'trusted')
77
77
  end
78
78
 
79
+ def self.trusted_external_facts(filter = nil)
80
+ @@existing_controlrepo.facts(filter, 'trusted_external')
81
+ end
82
+
79
83
  def self.hiera_config_file
80
84
  @@existing_controlrepo.hiera_config_file
81
85
  end
@@ -596,7 +600,7 @@ class Onceover
596
600
 
597
601
  # Loop over each test, executing the user's block on each
598
602
  tests.each do |tst|
599
- block.call(tst.classes[0].name, tst.nodes[0].name, tst.nodes[0].fact_set, testconfig.pre_condition)
603
+ block.call(tst.classes[0].name, tst.nodes[0].name, tst.nodes[0].fact_set, tst.nodes[0].trusted_set, tst.nodes[0].trusted_external_set, testconfig.pre_condition)
600
604
  end
601
605
  end
602
606
 
data/lib/onceover/node.rb CHANGED
@@ -9,6 +9,7 @@ class Onceover
9
9
  attr_accessor :beaker_node
10
10
  attr_accessor :fact_set
11
11
  attr_accessor :trusted_set
12
+ attr_accessor :trusted_external_set
12
13
 
13
14
  def initialize(name)
14
15
  @name = name
@@ -20,10 +21,26 @@ class Onceover
20
21
  File.basename(facts_file, '.json') == name
21
22
  }
22
23
  @fact_set = Onceover::Node.clean_facts(Onceover::Controlrepo.facts[facts_file_index])
24
+
25
+ # First see if we can find a 'trusted' hash at the top level of our factset
23
26
  @trusted_set = Onceover::Controlrepo.trusted_facts[facts_file_index]
27
+ # If we don't find it, attempt to find a 'trusted.extensions' hash nested in our fact_set
28
+ @trusted_set = @fact_set.dig('trusted', 'extensions') if @trusted_set.nil?
29
+ # If we still can't find any, return an empty hash so the following doesn't blow up user written tests:
30
+ # let(:trusted_facts) { trusted_facts }
31
+ @trusted_set = {} if @trusted_set.nil?
32
+
33
+ # First see if we can find a 'trusted_external' hash at the top level of our factset
34
+ @trusted_external_set = Onceover::Controlrepo.trusted_external_facts[facts_file_index]
35
+ # If we don't find it, attempt to find a 'trusted.external' hash nested in our fact_set
36
+ @trusted_external_set = @fact_set.dig('trusted', 'external') if @trusted_external_set.nil?
37
+ # If we still can't find any, return an empty hash so the following doesn't blow up user written tests:
38
+ # let(:trusted_external_data) { trusted_external_data }
39
+ @trusted_external_set = {} if @trusted_external_set.nil?
24
40
  rescue TypeError
25
- @fact_set = nil
26
- @trusted_set = nil
41
+ @fact_set = {}
42
+ @trusted_set = {}
43
+ @trusted_external_set = {}
27
44
  end
28
45
 
29
46
  @@all << self
data/onceover.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "onceover"
7
- s.version = "3.19.2"
7
+ s.version = "3.20.0"
8
8
  s.authors = ["Dylan Ratcliffe"]
9
9
  s.email = ["dylan.ratcliffe@puppet.com"]
10
10
  s.homepage = "https://github.com/dylanratcliffe/onceover"
@@ -0,0 +1,6 @@
1
+ # Role that fails compilation if $trusted['extensions']['pp_datacenter'] is not set to 'PDX'
2
+ class role::trusted_extensions {
3
+ unless $trusted['extensions']['pp_datacenter'] == 'PDX' {
4
+ fail ( 'pp_datacenter is not set to PDX' )
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ # Role that fails compilation if $trusted['external']['example']['foo'] is not set to 'bar'
2
+ class role::trusted_external {
3
+ unless $trusted['external']['example']['foo'] == 'bar' {
4
+ fail ( "example forager didn't return foo" )
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ # Factsets
2
+
3
+ This directory is where we put any custom factsets that we want to use. They can be generated by running `puppet facts` on the target system.
4
+
5
+ **Hot tip:** If you already have factsets in here when you run `onceover init` they will be picked up and added to the config file Automatically
6
+
7
+ More info: https://github.com/dylanratcliffe/onceover#factsets
@@ -0,0 +1,530 @@
1
+ {
2
+ "name": "pe-201980-agent1.puppetdebug.vlan",
3
+ "values": {
4
+ "aio_agent_build": "6.16.0",
5
+ "aio_agent_version": "6.16.0",
6
+ "architecture": "x86_64",
7
+ "augeas": {
8
+ "version": "1.12.0"
9
+ },
10
+ "augeasversion": "1.12.0",
11
+ "bios_release_date": "04/01/2014",
12
+ "bios_vendor": "SeaBIOS",
13
+ "bios_version": "1.11.0-2.el7",
14
+ "blockdevice_vda_size": 8589934592,
15
+ "blockdevice_vda_vendor": "0x1af4",
16
+ "blockdevices": "vda",
17
+ "chassistype": "Other",
18
+ "dhcp_servers": {
19
+ "eth0": "192.168.0.3",
20
+ "system": "192.168.0.3"
21
+ },
22
+ "disks": {
23
+ "vda": {
24
+ "size": "8.00 GiB",
25
+ "size_bytes": 8589934592,
26
+ "vendor": "0x1af4"
27
+ }
28
+ },
29
+ "dmi": {
30
+ "bios": {
31
+ "release_date": "04/01/2014",
32
+ "vendor": "SeaBIOS",
33
+ "version": "1.11.0-2.el7"
34
+ },
35
+ "chassis": {
36
+ "type": "Other"
37
+ },
38
+ "manufacturer": "OpenStack Foundation",
39
+ "product": {
40
+ "name": "OpenStack Nova",
41
+ "serial_number": "8a7ed12f-4cfb-4a90-93a8-eb955c7d5f03",
42
+ "uuid": "1BE23657-913C-4F09-BA2E-5F310E285CF7"
43
+ }
44
+ },
45
+ "domain": "puppetdebug.vlan",
46
+ "ec2_metadata": {
47
+ "ami-id": "None",
48
+ "ami-launch-index": "0",
49
+ "ami-manifest-path": "FIXME",
50
+ "block-device-mapping": {
51
+ "ami": "vda",
52
+ "ebs0": "/dev/vda",
53
+ "root": "/dev/vda"
54
+ },
55
+ "hostname": "pe-201980-agent1",
56
+ "instance-action": "none",
57
+ "instance-id": "i-00009bb2",
58
+ "instance-type": "vol.small",
59
+ "local-hostname": "pe-201980-agent1",
60
+ "local-ipv4": "192.168.0.17",
61
+ "placement": {
62
+ "availability-zone": "local-storage"
63
+ },
64
+ "public-hostname": "pe-201980-agent1",
65
+ "public-ipv4": "10.234.6.180",
66
+ "reservation-id": "r-ct7wblph",
67
+ "security-groups": "default"
68
+ },
69
+ "facterversion": "3.14.11",
70
+ "filesystems": "xfs",
71
+ "fips_enabled": false,
72
+ "fqdn": "pe-201980-agent1.puppetdebug.vlan",
73
+ "gid": "root",
74
+ "hardwareisa": "x86_64",
75
+ "hardwaremodel": "x86_64",
76
+ "hostname": "pe-201980-agent1",
77
+ "hypervisors": {
78
+ "kvm": {
79
+ "openstack": true
80
+ }
81
+ },
82
+ "id": "root",
83
+ "identity": {
84
+ "gid": 0,
85
+ "group": "root",
86
+ "privileged": true,
87
+ "uid": 0,
88
+ "user": "root"
89
+ },
90
+ "interfaces": "eth0,lo",
91
+ "ipaddress": "192.168.0.17",
92
+ "ipaddress6": "fe80::f816:3eff:fe57:2bce",
93
+ "ipaddress6_eth0": "fe80::f816:3eff:fe57:2bce",
94
+ "ipaddress6_lo": "::1",
95
+ "ipaddress_eth0": "192.168.0.17",
96
+ "ipaddress_lo": "127.0.0.1",
97
+ "is_pe": false,
98
+ "is_virtual": true,
99
+ "kernel": "Linux",
100
+ "kernelmajversion": "3.10",
101
+ "kernelrelease": "3.10.0-957.1.3.el7.x86_64",
102
+ "kernelversion": "3.10.0",
103
+ "load_averages": {
104
+ "15m": 0.12,
105
+ "1m": 0.13,
106
+ "5m": 0.08
107
+ },
108
+ "macaddress": "fa:16:3e:57:2b:ce",
109
+ "macaddress_eth0": "fa:16:3e:57:2b:ce",
110
+ "manufacturer": "OpenStack Foundation",
111
+ "memory": {
112
+ "system": {
113
+ "available": "1.19 GiB",
114
+ "available_bytes": 1277591552,
115
+ "capacity": "33.71%",
116
+ "total": "1.80 GiB",
117
+ "total_bytes": 1927393280,
118
+ "used": "619.70 MiB",
119
+ "used_bytes": 649801728
120
+ }
121
+ },
122
+ "memoryfree": "1.19 GiB",
123
+ "memoryfree_mb": 1218.40625,
124
+ "memorysize": "1.80 GiB",
125
+ "memorysize_mb": 1838.10546875,
126
+ "mountpoints": {
127
+ "/": {
128
+ "available": "4.68 GiB",
129
+ "available_bytes": 5022298112,
130
+ "capacity": "41.45%",
131
+ "device": "/dev/vda1",
132
+ "filesystem": "xfs",
133
+ "options": [
134
+ "rw",
135
+ "seclabel",
136
+ "relatime",
137
+ "attr2",
138
+ "inode64",
139
+ "noquota"
140
+ ],
141
+ "size": "7.99 GiB",
142
+ "size_bytes": 8578400256,
143
+ "used": "3.31 GiB",
144
+ "used_bytes": 3556102144
145
+ },
146
+ "/dev": {
147
+ "available": "896.73 MiB",
148
+ "available_bytes": 940290048,
149
+ "capacity": "0%",
150
+ "device": "devtmpfs",
151
+ "filesystem": "devtmpfs",
152
+ "options": [
153
+ "rw",
154
+ "seclabel",
155
+ "nosuid",
156
+ "size=918252k",
157
+ "nr_inodes=229563",
158
+ "mode=755"
159
+ ],
160
+ "size": "896.73 MiB",
161
+ "size_bytes": 940290048,
162
+ "used": "0 bytes",
163
+ "used_bytes": 0
164
+ },
165
+ "/dev/hugepages": {
166
+ "available": "0 bytes",
167
+ "available_bytes": 0,
168
+ "capacity": "100%",
169
+ "device": "hugetlbfs",
170
+ "filesystem": "hugetlbfs",
171
+ "options": [
172
+ "rw",
173
+ "seclabel",
174
+ "relatime"
175
+ ],
176
+ "size": "0 bytes",
177
+ "size_bytes": 0,
178
+ "used": "0 bytes",
179
+ "used_bytes": 0
180
+ },
181
+ "/dev/mqueue": {
182
+ "available": "0 bytes",
183
+ "available_bytes": 0,
184
+ "capacity": "100%",
185
+ "device": "mqueue",
186
+ "filesystem": "mqueue",
187
+ "options": [
188
+ "rw",
189
+ "seclabel",
190
+ "relatime"
191
+ ],
192
+ "size": "0 bytes",
193
+ "size_bytes": 0,
194
+ "used": "0 bytes",
195
+ "used_bytes": 0
196
+ },
197
+ "/dev/pts": {
198
+ "available": "0 bytes",
199
+ "available_bytes": 0,
200
+ "capacity": "100%",
201
+ "device": "devpts",
202
+ "filesystem": "devpts",
203
+ "options": [
204
+ "rw",
205
+ "seclabel",
206
+ "nosuid",
207
+ "noexec",
208
+ "relatime",
209
+ "gid=5",
210
+ "mode=620",
211
+ "ptmxmode=000"
212
+ ],
213
+ "size": "0 bytes",
214
+ "size_bytes": 0,
215
+ "used": "0 bytes",
216
+ "used_bytes": 0
217
+ },
218
+ "/dev/shm": {
219
+ "available": "919.05 MiB",
220
+ "available_bytes": 963694592,
221
+ "capacity": "0%",
222
+ "device": "tmpfs",
223
+ "filesystem": "tmpfs",
224
+ "options": [
225
+ "rw",
226
+ "seclabel",
227
+ "nosuid",
228
+ "nodev"
229
+ ],
230
+ "size": "919.05 MiB",
231
+ "size_bytes": 963694592,
232
+ "used": "0 bytes",
233
+ "used_bytes": 0
234
+ },
235
+ "/run": {
236
+ "available": "886.63 MiB",
237
+ "available_bytes": 929693696,
238
+ "capacity": "3.53%",
239
+ "device": "tmpfs",
240
+ "filesystem": "tmpfs",
241
+ "options": [
242
+ "rw",
243
+ "seclabel",
244
+ "nosuid",
245
+ "nodev",
246
+ "mode=755"
247
+ ],
248
+ "size": "919.05 MiB",
249
+ "size_bytes": 963694592,
250
+ "used": "32.43 MiB",
251
+ "used_bytes": 34000896
252
+ },
253
+ "/run/user/1000": {
254
+ "available": "183.81 MiB",
255
+ "available_bytes": 192741376,
256
+ "capacity": "0%",
257
+ "device": "tmpfs",
258
+ "filesystem": "tmpfs",
259
+ "options": [
260
+ "rw",
261
+ "seclabel",
262
+ "nosuid",
263
+ "nodev",
264
+ "relatime",
265
+ "size=188224k",
266
+ "mode=700",
267
+ "uid=1000",
268
+ "gid=1000"
269
+ ],
270
+ "size": "183.81 MiB",
271
+ "size_bytes": 192741376,
272
+ "used": "0 bytes",
273
+ "used_bytes": 0
274
+ },
275
+ "/sys/fs/cgroup": {
276
+ "available": "919.05 MiB",
277
+ "available_bytes": 963694592,
278
+ "capacity": "0%",
279
+ "device": "tmpfs",
280
+ "filesystem": "tmpfs",
281
+ "options": [
282
+ "ro",
283
+ "seclabel",
284
+ "nosuid",
285
+ "nodev",
286
+ "noexec",
287
+ "mode=755"
288
+ ],
289
+ "size": "919.05 MiB",
290
+ "size_bytes": 963694592,
291
+ "used": "0 bytes",
292
+ "used_bytes": 0
293
+ },
294
+ "/var/lib/nfs/rpc_pipefs": {
295
+ "available": "0 bytes",
296
+ "available_bytes": 0,
297
+ "capacity": "100%",
298
+ "device": "rpc_pipefs",
299
+ "filesystem": "rpc_pipefs",
300
+ "options": [
301
+ "rw",
302
+ "relatime"
303
+ ],
304
+ "size": "0 bytes",
305
+ "size_bytes": 0,
306
+ "used": "0 bytes",
307
+ "used_bytes": 0
308
+ }
309
+ },
310
+ "mtu_eth0": 1500,
311
+ "mtu_lo": 65536,
312
+ "netmask": "255.255.255.0",
313
+ "netmask6": "ffff:ffff:ffff:ffff::",
314
+ "netmask6_eth0": "ffff:ffff:ffff:ffff::",
315
+ "netmask6_lo": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
316
+ "netmask_eth0": "255.255.255.0",
317
+ "netmask_lo": "255.0.0.0",
318
+ "network": "192.168.0.0",
319
+ "network6": "fe80::",
320
+ "network6_eth0": "fe80::",
321
+ "network6_lo": "::1",
322
+ "network_eth0": "192.168.0.0",
323
+ "network_lo": "127.0.0.0",
324
+ "networking": {
325
+ "dhcp": "192.168.0.3",
326
+ "domain": "puppetdebug.vlan",
327
+ "fqdn": "pe-201980-agent1.puppetdebug.vlan",
328
+ "hostname": "pe-201980-agent1",
329
+ "interfaces": {
330
+ "eth0": {
331
+ "bindings": [
332
+ {
333
+ "address": "192.168.0.17",
334
+ "netmask": "255.255.255.0",
335
+ "network": "192.168.0.0"
336
+ }
337
+ ],
338
+ "bindings6": [
339
+ {
340
+ "address": "fe80::f816:3eff:fe57:2bce",
341
+ "netmask": "ffff:ffff:ffff:ffff::",
342
+ "network": "fe80::"
343
+ }
344
+ ],
345
+ "dhcp": "192.168.0.3",
346
+ "ip": "192.168.0.17",
347
+ "ip6": "fe80::f816:3eff:fe57:2bce",
348
+ "mac": "fa:16:3e:57:2b:ce",
349
+ "mtu": 1500,
350
+ "netmask": "255.255.255.0",
351
+ "netmask6": "ffff:ffff:ffff:ffff::",
352
+ "network": "192.168.0.0",
353
+ "network6": "fe80::",
354
+ "scope6": "link"
355
+ },
356
+ "lo": {
357
+ "bindings": [
358
+ {
359
+ "address": "127.0.0.1",
360
+ "netmask": "255.0.0.0",
361
+ "network": "127.0.0.0"
362
+ }
363
+ ],
364
+ "bindings6": [
365
+ {
366
+ "address": "::1",
367
+ "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
368
+ "network": "::1"
369
+ }
370
+ ],
371
+ "ip": "127.0.0.1",
372
+ "ip6": "::1",
373
+ "mtu": 65536,
374
+ "netmask": "255.0.0.0",
375
+ "netmask6": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
376
+ "network": "127.0.0.0",
377
+ "network6": "::1",
378
+ "scope6": "host"
379
+ }
380
+ },
381
+ "ip": "192.168.0.17",
382
+ "ip6": "fe80::f816:3eff:fe57:2bce",
383
+ "mac": "fa:16:3e:57:2b:ce",
384
+ "mtu": 1500,
385
+ "netmask": "255.255.255.0",
386
+ "netmask6": "ffff:ffff:ffff:ffff::",
387
+ "network": "192.168.0.0",
388
+ "network6": "fe80::",
389
+ "primary": "eth0",
390
+ "scope6": "link"
391
+ },
392
+ "operatingsystem": "CentOS",
393
+ "operatingsystemmajrelease": "7",
394
+ "operatingsystemrelease": "7.6.1810",
395
+ "os": {
396
+ "architecture": "x86_64",
397
+ "family": "RedHat",
398
+ "hardware": "x86_64",
399
+ "name": "CentOS",
400
+ "release": {
401
+ "full": "7.6.1810",
402
+ "major": "7",
403
+ "minor": "6"
404
+ },
405
+ "selinux": {
406
+ "config_mode": "enforcing",
407
+ "config_policy": "targeted",
408
+ "current_mode": "enforcing",
409
+ "enabled": true,
410
+ "enforced": true,
411
+ "policy_version": "31"
412
+ }
413
+ },
414
+ "osfamily": "RedHat",
415
+ "package_provider": "yum",
416
+ "partitions": {
417
+ "/dev/vda1": {
418
+ "filesystem": "xfs",
419
+ "mount": "/",
420
+ "size": "8.00 GiB",
421
+ "size_bytes": 8588886016,
422
+ "uuid": "f41e390f-835b-4223-a9bb-9b45984ddf8d"
423
+ }
424
+ },
425
+ "path": "/root/.rbenv/shims:/root/.rbenv/bin:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin:/root/bin:/root/bin",
426
+ "pe_patch": {
427
+ "package_updates": [
428
+
429
+ ],
430
+ "package_update_count": 0,
431
+ "missing_update_kbs": [
432
+
433
+ ],
434
+ "security_package_updates": [
435
+
436
+ ],
437
+ "security_package_update_count": 0,
438
+ "blackouts": {
439
+ },
440
+ "pinned_packages": [
441
+
442
+ ],
443
+ "last_run": {
444
+ },
445
+ "patch_group": "",
446
+ "reboot_override": "default",
447
+ "reboots": {
448
+ "reboot_required": "unknown"
449
+ },
450
+ "block_patching_on_warnings": "false",
451
+ "warnings": {
452
+ "update_file": "Update file not found, update information invalid",
453
+ "security_update_file": "Security update file not found, update information invalid"
454
+ },
455
+ "blocked": false,
456
+ "blocked_reasons": [
457
+
458
+ ]
459
+ },
460
+ "physicalprocessorcount": 1,
461
+ "platform_symlink_writable": true,
462
+ "platform_tag": "el-7-x86_64",
463
+ "processor0": "Intel Core Processor (Haswell, no TSX, IBRS)",
464
+ "processorcount": 1,
465
+ "processors": {
466
+ "count": 1,
467
+ "isa": "x86_64",
468
+ "models": [
469
+ "Intel Core Processor (Haswell, no TSX, IBRS)"
470
+ ],
471
+ "physicalcount": 1
472
+ },
473
+ "productname": "OpenStack Nova",
474
+ "puppet_environmentpath": "/etc/puppetlabs/code/environments",
475
+ "puppet_files_dir_present": false,
476
+ "puppet_inventory_metadata": {
477
+ "packages": {
478
+ "collection_enabled": false,
479
+ "last_collection_time": "0.0s"
480
+ }
481
+ },
482
+ "puppet_metrics_collector": {
483
+ "have_vmware_tools": false,
484
+ "have_pe_psql": false
485
+ },
486
+ "puppet_server": "pe-201980-master.puppetdebug.vlan",
487
+ "puppet_vardir": "/opt/puppetlabs/puppet/cache",
488
+ "puppetversion": "6.16.0",
489
+ "root_home": "/root",
490
+ "ruby": {
491
+ "platform": "x86_64-linux",
492
+ "sitedir": "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.5.0",
493
+ "version": "2.5.8"
494
+ },
495
+ "rubyplatform": "x86_64-linux",
496
+ "rubysitedir": "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.5.0",
497
+ "rubyversion": "2.5.8",
498
+ "scope6": "link",
499
+ "scope6_eth0": "link",
500
+ "scope6_lo": "host",
501
+ "selinux": true,
502
+ "selinux_config_mode": "enforcing",
503
+ "selinux_config_policy": "targeted",
504
+ "selinux_current_mode": "enforcing",
505
+ "selinux_enforced": true,
506
+ "selinux_policyversion": "31",
507
+ "serialnumber": "8a7ed12f-4cfb-4a90-93a8-eb955c7d5f03",
508
+ "service_provider": "systemd",
509
+ "splunk_hec_is_pe": false,
510
+ "staging_http_get": "curl",
511
+ "system_uptime": {
512
+ "days": 49,
513
+ "hours": 1176,
514
+ "seconds": 4236638,
515
+ "uptime": "49 days"
516
+ },
517
+ "timezone": "UTC",
518
+ "uptime": "49 days",
519
+ "uptime_days": 49,
520
+ "uptime_hours": 1176,
521
+ "uptime_seconds": 4236638,
522
+ "uuid": "1BE23657-913C-4F09-BA2E-5F310E285CF7",
523
+ "virtual": "kvm",
524
+ "clientcert": "pe-201980-agent1.puppetdebug.vlan",
525
+ "clientversion": "6.16.0",
526
+ "clientnoop": false
527
+ },
528
+ "timestamp": "2021-03-23T20:11:25.345180149+00:00",
529
+ "expiration": "2021-03-23T20:41:25.345633462+00:00"
530
+ }