Skip to content

Commit 802d91f

Browse files
authored
Add --exclude_resource_types= flag (#27)
1 parent 9c2e863 commit 802d91f

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

β€Žlib/puppet/catalog-diff/differ.rbβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ def diff(options = {})
7171
end
7272
end
7373

74+
if options[:exclude_resource_types]
75+
types = options[:exclude_resource_types].split(',')
76+
[to, from].each do |c|
77+
c.reject! { |x| types.include?(x[:type]) }
78+
end
79+
end
80+
7481
Puppet.debug("Processing: #{from_file}")
7582
titles = {}
7683
titles[:to] = extract_titles(to)

β€Žlib/puppet/face/catalog/diff.rbβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
summary 'Do not print defined resources in resource diffs'
4141
end
4242

43+
option '--exclude_resource_types=' do
44+
summary 'A comma-separated list of (capitalized) resource types to exclude from the diff'
45+
end
46+
4347
option '--ignore_parameters=' do
4448
summary 'A comma-separated list of resource parameters to ignore in diff'
4549
end

0 commit comments

Comments
Β (0)