summaryrefslogtreecommitdiff
path: root/manifests/client.pp
diff options
context:
space:
mode:
authorMathieu Bornoz <mathieu.bornoz@camptocamp.com>2013-05-01 10:10:35 +0200
committerRaphaƫl Pinson <raphael.pinson@camptocamp.com>2013-12-03 09:35:38 +0100
commitfb924446a69b9ce07ea898d5d301ccca8de72b2f (patch)
tree8a31bba5306311dd81ec90bf443c501304c24320 /manifests/client.pp
parentf8a05e0e6dd7a40fe53329a20ff81227b23bb398 (diff)
SSL support
Diffstat (limited to 'manifests/client.pp')
-rw-r--r--manifests/client.pp14
1 files changed, 12 insertions, 2 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index 624dfe8..37be590 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -14,6 +14,7 @@
# [*custom_params*]
# [*server*]
# [*port*]
+# [*ssl_ca*]
#
# === Variables
#
@@ -30,7 +31,8 @@ class rsyslog::client (
$custom_config = undef,
$custom_params = undef,
$server = 'log',
- $port = '514'
+ $port = '514',
+ $ssl_ca = undef,
) inherits rsyslog {
$content_real = $custom_config ? {
@@ -41,6 +43,14 @@ class rsyslog::client (
rsyslog::snippet {'client':
ensure => present,
content => $content_real,
- }
+ }
+
+ if $rsyslog::ssl and $ssl_ca == undef {
+ fail('You need to define $ssl_ca in order to use SSL.')
+ }
+
+ if $rsyslog::ssl and $remote_type != 'tcp' {
+ fail('You need to enable tcp in order to use SSL.')
+ }
}