Skip to content

Commit

Permalink
Simplify if statement using ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Charreau committed Dec 20, 2023
1 parent 9a4f983 commit bfdc006
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/puppet/provider/elastic_stack_keystore/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ def self.present_keystores(configdir, service, password = '')
end
settings = {}
run_keystore(['list'], service).split("\n").each do |setting|
if service == 'kibana'
settings[setting] = ''
else
settings[setting] = run_keystore(['show', setting], service)
end
settings[setting] = service == 'kibana' ? '' : run_keystore(['show', setting], service)
end
[{
name: service,
Expand Down

0 comments on commit bfdc006

Please sign in to comment.