Skip to content

Commit 66ae92f

Browse files
authored
Merge pull request #8538 from luchihoratiu/PUP-10947
(PUP-10947) Modify the exclude list for `puppet facts diff`
2 parents 8ea8c45 + 0c85a9a commit 66ae92f

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

lib/puppet/face/facts.rb

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,20 @@
22
require 'puppet/node/facts'
33
require 'puppet/util/fact_dif'
44

5-
EXCLUDE_LIST = %w[facterversion
6-
swapfree_mb swapsize_mb
7-
load_averages\.*
8-
memory\.swap\.available_bytes memory\.swap\.capacity memory\.swap\.total_bytes
9-
memory\.swap\.used_bytes memory\.swap\.available
10-
memory\.system\.available memory\.system\.available_bytes memory\.system\.capacity memory\.swap\.used
11-
memory\.system\.total_bytes memory\.system\.used memory\.system\.used_bytes
12-
memoryfree memoryfree_mb memorysize_mb
13-
mountpoints\..* mtu_.* mountpoints\..*\.capacity
14-
networking\.interfaces\..*\.mtu networking\.mtu partitions\..*\.filesystem
15-
partitions\..*\.size_bytes partitions\..*\.mount partitions\..*\.uuid
16-
disks\..*\.size_bytes
17-
hypervisors\.lpar\.partition_number hypervisors\.xen\.privileged hypervisors\.zone\..* hypervisors\.ldom\..*
5+
EXCLUDE_LIST = %w[ facterversion
6+
load_averages\..*
187
processors\.speed
19-
ldom_.*
20-
boardassettag dmi\.board\.asset_tag
21-
blockdevice_.*_vendor blockdevice_.*_size
22-
system_uptime\.days system_uptime\.hours system_uptime\.seconds system_uptime\.uptime
23-
uptime_days uptime_hours uptime_seconds
24-
system_profiler\.uptime
25-
sp_uptime
26-
uptime]
8+
swapfree swapfree_mb
9+
memoryfree memoryfree_mb
10+
memory\.swap\.available_bytes memory\.swap\.used_bytes
11+
memory\.swap\.available memory\.swap\.capacity memory\.swap\.used
12+
memory\.system\.available_bytes memory\.system\.used_bytes
13+
memory\.system\.available memory\.system\.capacity memory\.system\.used
14+
mountpoints\..*\.available* mountpoints\..*\.capacity mountpoints\..*\.used*
15+
sp_uptime system_profiler\.uptime
16+
uptime uptime_days uptime_hours uptime_seconds
17+
system_uptime\.uptime system_uptime\.days system_uptime\.hours system_uptime\.seconds
18+
]
2719

2820
Puppet::Indirector::Face.define(:facts, '0.0.1') do
2921
copyright "Puppet Inc.", 2011

lib/puppet/util/fact_dif.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ def different?(new, old)
5757
end
5858

5959
def excluded?(fact_name)
60-
@exclude_list.any? {|excluded_fact| fact_name =~ /#{excluded_fact}/}
60+
@exclude_list.any? {|excluded_fact| fact_name =~ /^#{excluded_fact}$/}
6161
end
6262
end

0 commit comments

Comments
 (0)