
This is revert of 74022b48ddb6312bcc3b82a92b9bc45fdcbf04f1 and its follow up commit 46b503f7b02f9aabad953776c2d8b4eb02859dda. The logic was added for Debian but we no longer have Debian jobs. Change-Id: I7633fbfbf3424f093dac5811e9c2fb8dcdf3167b
49 lines
1.4 KiB
Puppet
49 lines
1.4 KiB
Puppet
class openstack_integration::redis {
|
|
include openstack_integration::config
|
|
|
|
# NOTE(tobias-urdin): Manually manage redis until arioch/puppet-redis support
|
|
# redis 4.x since that is used by Ubuntu Bionic.
|
|
case $::osfamily {
|
|
'Debian': {
|
|
$redis_package_name = 'redis-server'
|
|
$redis_service_name = 'redis-server'
|
|
$redis_config = '/etc/redis/redis.conf'
|
|
}
|
|
'RedHat': {
|
|
$redis_package_name = 'redis'
|
|
$redis_service_name = 'redis'
|
|
if versioncmp($::operatingsystemmajrelease, '8') > 0 {
|
|
$redis_config = '/etc/redis/redis.conf'
|
|
} else {
|
|
$redis_config = '/etc/redis.conf'
|
|
}
|
|
}
|
|
default: {
|
|
fail("redis.pp manifest does not support family: ${::osfamily}")
|
|
}
|
|
}
|
|
|
|
# NOTE(tobias-urdin): Manually manage redis until arioch/puppet-redis support
|
|
# redis 4.x since that is used by Ubuntu Bionic.
|
|
package { 'redis':
|
|
ensure => 'present',
|
|
name => $redis_package_name,
|
|
}
|
|
|
|
file_line { 'redis_config':
|
|
ensure => 'present',
|
|
path => $redis_config,
|
|
line => "bind ${::openstack_integration::config::host}",
|
|
match => '^bind\ ',
|
|
require => Package['redis'],
|
|
notify => Service['redis'],
|
|
}
|
|
|
|
service { 'redis':
|
|
ensure => 'running',
|
|
name => $redis_service_name,
|
|
enable => true,
|
|
require => File_line['redis_config'],
|
|
}
|
|
}
|