|
| 1 | +<%- | |
| 2 | + Boolean $daemonize, |
| 3 | + Boolean $protected_mode, |
| 4 | + Boolean $tls_replication, |
| 5 | + Enum['yes', 'no', 'optional'] $tls_auth_clients, |
| 6 | + Integer[1] $down_after, |
| 7 | + Integer[1] $failover_timeout, |
| 8 | + Integer[0] $parallel_sync, |
| 9 | + Integer[1] $quorum, |
| 10 | + Optional[Enum['yes', 'no']] $sentinel_announce_hostnames, |
| 11 | + Optional[Stdlib::Host] $sentinel_announce_ip, |
| 12 | + Optional[Stdlib::Port] $sentinel_announce_port, |
| 13 | + Optional[Enum['yes', 'no']] $sentinel_resolve_hostnames, |
| 14 | + Optional[Stdlib::Absolutepath] $client_reconfig_script, |
| 15 | + Optional[Stdlib::Absolutepath] $notification_script, |
| 16 | + Optional[Stdlib::Absolutepath] $tls_ca_cert_dir, |
| 17 | + Optional[Stdlib::Absolutepath] $tls_ca_cert_file, |
| 18 | + Optional[Stdlib::Absolutepath] $tls_cert_file, |
| 19 | + Optional[Stdlib::Absolutepath] $tls_key_file, |
| 20 | + Optional[Stdlib::Port::Unprivileged] $sentinel_tls_port, |
| 21 | + Optional[String[1]] $requirepass, |
| 22 | + Optional[String[1]] $sentinel_auth_user, |
| 23 | + Optional[Variant[String[1], Sensitive[String[1]]]] $auth_pass, |
| 24 | + Optional[Variant[String[1], Sensitive[String[1]]]] $sentinel_auth_pass, |
| 25 | + Optional[Variant[String[1], Sensitive[String[1]], Deferred]] $tls_key_file_pass, |
| 26 | + Redis::LogLevel $log_level, |
| 27 | + Stdlib::Absolutepath $log_file, |
| 28 | + Stdlib::Absolutepath $pid_file, |
| 29 | + Stdlib::Absolutepath $working_dir, |
| 30 | + Stdlib::Host $redis_host, |
| 31 | + Stdlib::Port $redis_port, |
| 32 | + Stdlib::Port $sentinel_port, |
| 33 | + String[1] $master_name, |
| 34 | + Array[Stdlib::IP::Address] $sentinel_bind_arr, |
| 35 | + Array[String[1]] $acls, |
| 36 | +| -%><%# THIS FILE IS MANAGED BY PUPPET -%> |
| 37 | +<% unless $sentinel_bind_arr.empty { -%> |
| 38 | +bind <%= $sentinel_bind_arr.join(' ') %> |
| 39 | +<%- } -%> |
| 40 | +port <%= $sentinel_port %> |
| 41 | +<% if $sentinel_tls_port { -%> |
| 42 | +tls-port <%= $sentinel_tls_port %> |
| 43 | +<%- } -%> |
| 44 | +dir <%= $working_dir %> |
| 45 | +daemonize <%= $daemonize ? { true => 'yes', false => 'no' } %> |
| 46 | +supervised auto |
| 47 | +pidfile <%= $pid_file %> |
| 48 | +protected-mode <%= $protected_mode ? { true => 'yes', false => 'no' } %> |
| 49 | +<% if $sentinel_auth_user { -%> |
| 50 | + |
| 51 | +sentinel sentinel-user <%= $sentinel_auth_user %> |
| 52 | +<%- } -%> |
| 53 | +<% if $sentinel_auth_pass { -%> |
| 54 | +sentinel sentinel-pass <%= $sentinel_auth_pass.unwrap %> |
| 55 | +<%- } -%> |
| 56 | + |
| 57 | +<% if $sentinel_announce_hostnames { -%> |
| 58 | +sentinel announce-hostnames <%= $sentinel_announce_hostnames %> |
| 59 | +<%- } -%> |
| 60 | +<% if $sentinel_announce_ip { -%> |
| 61 | +sentinel announce-ip <%= $sentinel_announce_ip %> |
| 62 | +<%- } -%> |
| 63 | +<% if $sentinel_announce_port { -%> |
| 64 | +sentinel announce-port <%= $sentinel_announce_port %> |
| 65 | +<%- } -%> |
| 66 | +<% if $sentinel_resolve_hostnames { -%> |
| 67 | +sentinel resolve-hostnames <%= $sentinel_resolve_hostnames %> |
| 68 | +<%- } -%> |
| 69 | +sentinel monitor <%= $master_name %> <%= $redis_host %> <%= $redis_port %> <%= $quorum %> |
| 70 | +sentinel down-after-milliseconds <%= $master_name %> <%= $down_after %> |
| 71 | +sentinel parallel-syncs <%= $master_name %> <%= $parallel_sync %> |
| 72 | +sentinel failover-timeout <%= $master_name %> <%= $failover_timeout %> |
| 73 | +<% if $auth_pass { -%> |
| 74 | +sentinel auth-pass <%= $master_name %> <%= $auth_pass.unwrap %> |
| 75 | +<%- } -%> |
| 76 | +<% if $notification_script { -%> |
| 77 | +sentinel notification-script <%= $master_name %> <%= $notification_script %> |
| 78 | +<%- } -%> |
| 79 | +<% if $client_reconfig_script { -%> |
| 80 | +sentinel client-reconfig-script <%= $master_name %> <%= $client_reconfig_script %> |
| 81 | +<%- } -%> |
| 82 | +<% if $requirepass { -%> |
| 83 | +requirepass <%= $requirepass %> |
| 84 | +<%- } -%> |
| 85 | +<% if $sentinel_tls_port { -%> |
| 86 | + |
| 87 | +tls-cert-file <%= $tls_cert_file %> |
| 88 | +tls-key-file <%= $tls_key_file %> |
| 89 | +<% if $tls_key_file_pass { -%> |
| 90 | +tls-key-file-pass <%= $tls_key_file_pass.unwrap %> |
| 91 | +<%- } -%> |
| 92 | +<% if $tls_ca_cert_file { -%> |
| 93 | +tls-ca-cert-file <%= $tls_ca_cert_file %> |
| 94 | +<%- } -%> |
| 95 | +<% if $tls_ca_cert_dir { -%> |
| 96 | +tls-ca-cert-dir <%= $tls_ca_cert_dir %> |
| 97 | +<%- } -%> |
| 98 | +tls-auth-clients <%= $tls_auth_clients %> |
| 99 | +<% if $tls_replication { -%> |
| 100 | +tls-replication <%= $tls_replication ? { true => 'yes', false => 'no' } %> |
| 101 | +<%- } -%> |
| 102 | +<%- } -%> |
| 103 | + |
| 104 | +loglevel <%= $log_level %> |
| 105 | +logfile <%= $log_file %> |
| 106 | +<% unless $acls.empty { -%> |
| 107 | + |
| 108 | +<% $acls.each |$acl| { -%> |
| 109 | +<%= $acl %> |
| 110 | +<%- } -%> |
| 111 | +<%- } -%> |
| 112 | + |
0 commit comments