Skip to content

Commit

Permalink
Fixes #28329 - Handle redis config files paths better
Browse files Browse the repository at this point in the history
This should allow us to modify them more easily when running on different
platforms.
  • Loading branch information
adamruzicka committed Jan 21, 2020
1 parent 1f24eb6 commit 61ccc3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion definitions/features/dynflow_sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def service_names
end

def configured_instances
Dir['/etc/foreman/dynflow/*'].map { |config| File.basename(config).gsub(/\.yml$/, '') }
Dir['/etc/foreman/dynflow/*'].map { |config| File.basename(config, '.yml') }
end
end
7 changes: 5 additions & 2 deletions definitions/features/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ def services
end

def config_files
["/etc/opt/rh/#{SCL_NAME}/redis",
"/etc/opt/rh/#{SCL_NAME}/redis.conf"]
%w(redis redis.conf).map { |config| File.join(etc_prefix, config) }
end

private

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

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

0 comments on commit 61ccc3c

Please sign in to comment.