puppet-openstack-integration/manifests/redis.pp
Takashi Kajinami ca4a544416 Redis: Enable SSL
This updates the redis server/client configuration so that ssl is
enabled if the scenario globally enables ssl.

Change-Id: Ic5c2bcc5ec256bc91e2dcd08337f8d1fa0ea49d8
2023-03-21 00:55:36 +09:00

31 lines
928 B
Puppet

class openstack_integration::redis {
include openstack_integration::config
$port = $openstack_integration::config::ssl ? {
true => 0,
default => 6379
}
$tls_port = $openstack_integration::config::ssl ? {
true => 6379,
default => 0
}
class { 'redis':
bind => $::openstack_integration::config::host,
port => $port,
tls_port => $tls_port,
tls_cert_file => $::openstack_integration::params::cert_path,
tls_key_file => "/etc/redis/ssl/private/${facts['networking']['fqdn']}.pem",
tls_ca_cert_file => $::openstack_integration::params::ca_bundle_cert_path,
ulimit_managed => false,
requirepass => 'a_big_secret',
}
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'redis':
require => Package[$::redis::package_name],
notify => Service[$::redis::service_name],
}
}
}