Skip to content

Commit

Permalink
PE-38801 Linting errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronShannon committed Oct 2, 2024
1 parent a06d27e commit b4574c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/get_group_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
require 'net/http'
require 'puppet'

# GetInfrastructureAgentGroupRules task class
class GetInfrastructureAgentGroupRules
def execute!
infrastructure_agent_group = groups.find { |obj| obj['name'] == 'PE Infrastructure Agent' }
if infrastructure_agent_group
puts "WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:"
puts 'WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:'
puts JSON.pretty_generate(infrastructure_agent_group['rule'])
else
puts JSON.pretty_generate({ 'error' => 'PE Infrastructure Agent group does not exist' })
Expand Down Expand Up @@ -39,4 +40,4 @@ def https(port)
unless ENV['RSPEC_UNIT_TEST_MODE']
Puppet.initialize_settings
GetInfrastructureAgentGroupRules.new.execute!
end
end

0 comments on commit b4574c7

Please sign in to comment.