Puppet Class: rsyslog

Defined in:
manifests/init.pp

Summary

Manage the Rsyslog daemon package, service, and configuration.

Overview

Examples:

using class

class { 'rsyslog':
  manage_service => true,
}

using hieradata

# Manifest
include rsyslog
include rsyslog::config

# Hieradata
---
rsyslog::confdir: /etc/rsyslog.d
rsyslog::package_name: rsyslog
rsyslog::config::global_config:
  workDirectory:
    value: '/var/spool/rsyslog'

Parameters:

  • confdir (String)

    The rsyslog configuration directory.

  • package_name (String)

    The name of the rsyslog package to install.

  • package_version (String)

    The version of rsyslog to install.

  • config_file (String)

    The global rsyslog configuration file.

  • feature_packages (Array)

    List of additional rsyslog packages to install.

  • module_load_priority (Integer)

    Order the loading of rsyslog modules relative to other configuration.

  • service_name (String)

    Name of the SystemD, Upstart, or SysVInit service.

  • service_status (String)

    State desired for the rsyslog service.

  • service_enabled (Boolean)

    Is the service enabled or not.

  • override_default_config (Boolean)

    Override the default rsyslog.conf file.

  • manage_package (Boolean)

    Toggle the managing of the rsyslog package.

  • use_upstream_repo (Boolean)

    Toggle using the upstream Adiscon Rsyslog repository.

  • manage_confdir (Boolean)

    Toggle management of the Rsyslog configuration directory.

  • manage_service (Boolean)

    Toggle management of the rsyslog service.

  • external_service (Boolean)

    Toggle if the service is external to where rsyslog is being run. I.E. a service that starts a docker container running rsyslog.

  • purge_config_files (Boolean)

    Toggle purging of unmanaged configuration files.

  • global_config_priority (Integer)

    Set the global ordering of global configuration parameters in rsyslog.

  • legacy_config_priority (Integer)

    Set the global ordering of legacy configuration parameters in rsyslog.

  • template_priority (Integer)

    Set the global ordering of template configuration in rsyslog.

  • action_priority (Integer)

    Set the global ordering of action configuration in rsyslog.

  • input_priority (Integer)

    Set the global ordering of input configuration in rsyslog.

  • custom_priority (Integer)

    Set the global ordering of custom configuration in rsyslog.

  • main_queue_priority (Integer)

    Set the global ordering of main queue configuration in rsyslog.

  • lookup_table_priority (Integer)

    Set the global ordering of lookup table configuration in rsyslog.

  • parser_priorty

    Set the global ordering of parser configuration in rsyslog.

  • ruleset_priority (Integer)

    Set the global ordering of rulesets configuration in rsyslog.

  • filter_priority (Integer)

    Set the global ordering of filter configuration in rsyslog.

  • target_file (String)

    Target file to insert configuration into.

  • conf_permissions (Stdlib::Filemode) (defaults to: '0644')

    Set the file mode for the generated configuration files.

  • confdir_permissions (Stdlib::Filemode) (defaults to: '0755')

    Set the file mode for the rsyslog.d configuration directory.

  • global_conf_perms (Stdlib::Filemode) (defaults to: $conf_permissions)

    Set the file mode for the /etc/rsyslog.conf

  • parser_priority (Integer)

Author:

  • Vox Pupuli <voxpupuli@groups.io>



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'manifests/init.pp', line 89

class rsyslog (
  String            $confdir,
  String            $package_name,
  String            $package_version,
  String            $config_file,
  Array             $feature_packages,
  Integer           $module_load_priority,
  String            $service_name,
  String            $service_status,
  Boolean           $service_enabled,
  Boolean           $override_default_config,
  Boolean           $manage_package,
  Boolean           $use_upstream_repo,
  Boolean           $manage_confdir,
  Boolean           $manage_service,
  Boolean           $external_service,
  Boolean           $purge_config_files,
  Integer           $global_config_priority,
  Integer           $legacy_config_priority,
  Integer           $template_priority,
  Integer           $action_priority,
  Integer           $input_priority,
  Integer           $custom_priority,
  Integer           $main_queue_priority,
  Integer           $lookup_table_priority,
  Integer           $parser_priority,
  Integer           $ruleset_priority,
  Integer           $filter_priority,
  String            $target_file,
  Stdlib::Filemode  $conf_permissions = '0644',
  Stdlib::Filemode  $confdir_permissions = '0755',
  Stdlib::Filemode  $global_conf_perms = $conf_permissions,
) {
  if $manage_service == true and $external_service == true {
    fail('manage_service and external_service cannot be set at the same time!')
  } else {
    contain 'rsyslog::base'
  }
}