File: redis.pp

package info (click to toggle)
openstack-cluster-installer 43.0.22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,544 kB
  • sloc: php: 19,169; sh: 18,137; ruby: 75; makefile: 31; xml: 8
file content (49 lines) | stat: -rw-r--r-- 1,583 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class oci::redis(
  $bind_host        = undef,
  $cluster_enabled  = false,
  $ip_of_master     = undef,
  $machine_hostname = 'node1.example.com',
  #$pass_redis       = 'a_big_secret',
){

  oci::sslkeypair { 'redis':
    notify_service_name => 'redis-server',
    require_anchor => Package['redis-server'],
  }

  #if $bind_host == $ip_of_master {
  #  $slaveof = undef
  #}else{
  #  $slaveof = "${ip_of_master} 6379"
  #}

  class { 'redis':
    bind                 => $bind_host,
    #masterauth           => $pass_redis,
    tls_port             => 6380,
    tls_cert_file        => "/etc/redis/ssl/public/${machine_hostname}.crt",
    tls_key_file         => "/etc/redis/ssl/private/${machine_hostname}.pem",
    tls_ca_cert_file     => '/etc/ssl/certs/oci-pki-oci-ca-chain.pem',
    ulimit_managed       => false,
    protected_mode       => false,
    #cluster_enabled      => $cluster_enabled,
    #requirepass          => $pass_redis,
    #cluster_config_file  => 'nodes.conf',
    #cluster_node_timeout => 5000,
  }

  #class { 'redis::sentinel':
  #  auth_pass         => $pass_redis,
  #  redis_host        => $machine_hostname,
  #  redis_port        => 6379,
  #  requirepass       => $pass_redis,
  #  quorum            => 1,
  #  sentinel_tls_port => 26380,
  #  sentinel_bind     => $machine_hostname,
  #  tls_cert_file     => "/etc/redis/ssl/public/${machine_hostname}.crt",
  #  tls_key_file      => "/etc/redis/ssl/private/${machine_hostname}.pem",
  #  tls_ca_cert_file  => '/etc/ssl/certs/oci-pki-oci-ca-chain.pem',
  #  tls_replication   => true,
  #}

}