Skip to content
Snippets Groups Projects
Commit c0da2341 authored by Hans Persson's avatar Hans Persson
Browse files

Rename classes to keep within module namespace.

parent b3b58a54
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ class syslog::vars
# Add or remove $ModLoad directives from the rsyslog configuration.
define rsyslog::modload($ensure='present')
define syslog::modload($ensure='present')
{
$modload_re = sprintf(
'^\$[Mm][Oo][Dd][Ll][Oo][Aa][Dd]\s+%s(\s*#.*)?$', $name
......@@ -21,7 +21,7 @@ define rsyslog::modload($ensure='present')
{
'present': {
ensure_line {
"rsyslog::modload::${name}":
"syslog::modload::${name}":
file => '/etc/rsyslog.conf',
line => "\$ModLoad ${name}",
sufficient => $modload_re,
......@@ -32,7 +32,7 @@ define rsyslog::modload($ensure='present')
}
'absent': {
delete_lines {
"rsyslog::modload::${name}":
"syslog::modload::${name}":
file => '/etc/rsyslog.conf',
pattern => $modload_re,
require => Package['rsyslog'],
......@@ -40,7 +40,7 @@ define rsyslog::modload($ensure='present')
}
}
default: {
fail("Rsyslog::Modload[${title}]:",
fail("Syslog::Modload[${title}]:",
" Bad parameter ensure, \"${ensure}\"")
}
}
......@@ -54,19 +54,19 @@ class syslog::service
ensure => installed,
notify => Service['rsyslog'];
}
rsyslog::modload {
syslog::modload {
'imuxsock': ensure => present;
}
if $::initsystem == 'systemd' {
# Rsyslog should get kernel messages from journald instead of
# reading the kernel socket itself.
rsyslog::modload {
syslog::modload {
'imklog': ensure => absent;
'imjournal': ensure => present;
}
} else {
# But on non-systemd systems, it is of course the reverse.
rsyslog::modload {
syslog::modload {
'imklog': ensure => present;
'imjournal': ensure => absent;
}
......@@ -93,7 +93,7 @@ class syslog::service
# based on what the resolver library on the Puppet master thinks is best
# for *it*, not what's best for the node in question.
class logging::syslog_client(
class syslog::client(
$logserver='syslog.nsc.liu.se',
$ipfamily='ipv4', # 'ipv4', 'ipv6' or ['ipv4','ipv6']
$protocol='udp', # udp, tcp or relp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment