Puppet Class: conntrackd

Defined in:
modules/conntrackd/manifests/init.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:



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
# File 'modules/conntrackd/manifests/init.pp', line 2

class conntrackd (
    String $conntrackd_cfg,
    String $systemd_cfg,
) {
    ensure_packages('conntrackd')

    file { '/etc/conntrackd/conntrackd.conf':
        ensure  => present,
        content => $conntrackd_cfg,
        require => Package['conntrackd'],
        notify  => Systemd::Service['conntrackd'],
    }

    systemd::service { 'conntrackd':
        content => $systemd_cfg,
        restart => true,
    }

    # file shipped with the deb package, we don't want it
    file { '/var/log/conntrackd-stats.log':
        ensure => absent,
    }

    logrotate::rule { 'conntrackd':
        ensure        => present,
        file_glob     => '/var/log/conntrackd.log',
        frequency     => 'daily',
        not_if_empty  => true,
        rotate        => 3,
        compress      => true,
        missing_ok    => true,
        copy_truncate => true,
    }
}