Merge "Use puppet-redis to deploy Redis"
This commit is contained in:
commit
b552a77ffb
@ -230,3 +230,6 @@ mod 'ssh_keygen',
|
|||||||
:git => 'https://github.com/voxpupuli/puppet-ssh_keygen',
|
:git => 'https://github.com/voxpupuli/puppet-ssh_keygen',
|
||||||
:ref => 'v2.0.1'
|
:ref => 'v2.0.1'
|
||||||
|
|
||||||
|
mod 'redis',
|
||||||
|
:git => 'https://github.com/voxpupuli/puppet-redis',
|
||||||
|
:ref => 'v8.2.0'
|
||||||
|
@ -19,3 +19,4 @@ theforeman/puppet-dns
|
|||||||
voxpupuli/puppet-archive
|
voxpupuli/puppet-archive
|
||||||
voxpupuli/puppet-corosync,v8.0.0
|
voxpupuli/puppet-corosync,v8.0.0
|
||||||
voxpupuli/puppet-ssh_keygen,v2.0.1
|
voxpupuli/puppet-ssh_keygen,v2.0.1
|
||||||
|
voxpupuli/puppet-redis
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
class openstack_integration::redis {
|
class openstack_integration::redis {
|
||||||
include openstack_integration::config
|
include openstack_integration::config
|
||||||
|
|
||||||
# NOTE(tobias-urdin): Manually manage redis until arioch/puppet-redis support
|
# TODO(tkajinam): Remove this once puppet-redis supports CentOS 9
|
||||||
# redis 4.x since that is used by Ubuntu Bionic.
|
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$redis_package_name = 'redis-server'
|
|
||||||
$redis_service_name = 'redis-server'
|
|
||||||
$redis_config = '/etc/redis/redis.conf'
|
$redis_config = '/etc/redis/redis.conf'
|
||||||
}
|
}
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
$redis_package_name = 'redis'
|
|
||||||
$redis_service_name = 'redis'
|
|
||||||
if versioncmp($::operatingsystemmajrelease, '8') > 0 {
|
if versioncmp($::operatingsystemmajrelease, '8') > 0 {
|
||||||
$redis_config = '/etc/redis/redis.conf'
|
$redis_config = '/etc/redis/redis.conf'
|
||||||
} else {
|
} else {
|
||||||
@ -23,26 +18,10 @@ class openstack_integration::redis {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# NOTE(tobias-urdin): Manually manage redis until arioch/puppet-redis support
|
class { 'redis':
|
||||||
# redis 4.x since that is used by Ubuntu Bionic.
|
bind => $::openstack_integration::config::host,
|
||||||
package { 'redis':
|
config_file => $redis_config,
|
||||||
ensure => 'present',
|
config_file_orig => "${redis_config}.puppet",
|
||||||
name => $redis_package_name,
|
ulimit_managed => false,
|
||||||
}
|
|
||||||
|
|
||||||
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'],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user