Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding --node_list option #55

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Adding --node_list option #55

merged 1 commit into from
Feb 23, 2022

Conversation

serialh0bbyist
Copy link

Adding the option to manually specify a list of nodes to run catalog diffs against.

@DLeich
Copy link

DLeich commented Feb 18, 2022

Throwing my 👍 on this idea. Would love to use it.

nodes = options[:node_list].split(',')
else
nodes = Puppet::CatalogDiff::SearchFacts.new(args).find_nodes(options)
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly more Rubyish way to write this (and also easier to understand if/else instead of unless/else b/c it’s not a double-negative):

nodes = if options[:node_list].nil?
          Puppet::CatalogDiff::SearchFacts.new(args).find_nodes(options)
        else
          options[:node_list].split(',')
        end

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@raphink raphink merged commit feaec28 into voxpupuli:master Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants