Skip to content

Commit

Permalink
Fixes #28329 - Handle confine block running in the context of the class
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka committed Jan 21, 2020
1 parent 194351c commit bb9c27c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions definitions/features/redis.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Features::Redis < ForemanMaintain::Feature
SCL_NAME = 'rh-redis5'.freeze

metadata do
label :redis

Expand All @@ -11,24 +9,26 @@ class Features::Redis < ForemanMaintain::Feature
end

def services
[system_service(service_name, 10)]
[system_service(self.class.service_name, 10)]
end

def config_files
%w[redis redis.conf].map { |config| File.join(etc_prefix, config) }
%w[redis redis.conf].map { |config| File.join(self.class.etc_prefix, config) }
end

private
class << self
SCL_NAME = 'rh-redis5'.freeze

def etc_prefix
"/etc/opt/rh/#{SCL_NAME}"
end
def etc_prefix
"/etc/opt/rh/#{SCL_NAME}"
end

def scl_prefix
"#{SCL_NAME}-"
end
def scl_prefix
"#{SCL_NAME}-"
end

def service_name
"#{scl_prefix}redis"
def service_name
"#{scl_prefix}redis"
end
end
end

0 comments on commit bb9c27c

Please sign in to comment.