Puppet Class: toil::rsyslog_receiver_remedy

Defined in:
modules/toil/manifests/rsyslog_receiver_remedy.pp

Overview

Parameters:

  • cert_file (Stdlib::Unixpath)
  • key_file (Stdlib::Unixpath)
  • ca_file (Stdlib::Unixpath)
  • ensure (Wmflib::Ensure) (defaults to: present)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/toil/manifests/rsyslog_receiver_remedy.pp', line 5

class toil::rsyslog_receiver_remedy (
  Stdlib::Unixpath $cert_file,
  Stdlib::Unixpath $key_file,
  Stdlib::Unixpath $ca_file,
  Wmflib::Ensure   $ensure = present,
) {
  systemd::timer::job { 'rsyslog-receiver-remedy':
    ensure          => $ensure,
    # Don't log to file, use journald
    logging_enabled => false,
    user            => 'root',
    description     => 'Restart rsyslog-receiver when its TLS listener is not responding T199406',
    interval        => {
      'start'    => 'OnCalendar',
      'interval' => '*-*-* *:00/05:00', # every 5 min
    },
    command         => "/bin/sh -c \"timeout 5s openssl s_client -connect localhost:6514 -cert_chain ${cert_file} -cert ${cert_file} -key ${key_file} -CAfile ${ca_file} -quiet -no_ign_eof </dev/null || systemctl restart rsyslog-receiver\"",
  }
}