summaryrefslogtreecommitdiff
path: root/manifests/imfile.pp
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-05-24 10:19:39 -0400
committerMicah <micah@leap.se>2016-05-24 10:19:39 -0400
commit1419079315b69a271b5019bcf5e7c4df39633677 (patch)
tree69305f1afb350e2d3956b0c8767c3a70cde7c7e6 /manifests/imfile.pp
Squashed 'puppet/modules/rsyslog/' content from commit b8ef11c
git-subtree-dir: puppet/modules/rsyslog git-subtree-split: b8ef11c23949d12732ad5cdaebb3023ff39a297a
Diffstat (limited to 'manifests/imfile.pp')
-rw-r--r--manifests/imfile.pp48
1 files changed, 48 insertions, 0 deletions
diff --git a/manifests/imfile.pp b/manifests/imfile.pp
new file mode 100644
index 00000000..bd0afa36
--- /dev/null
+++ b/manifests/imfile.pp
@@ -0,0 +1,48 @@
+# == Define: rsyslog::imfile
+#
+# Full description of class role here.
+#
+# === Parameters
+#
+# [*file_name*]
+# [*file_tag*]
+# [*file_facility*]
+# [*polling_interval*]
+# [*file_severity*]
+# [*run_file_monitor*]
+# [*persist_state_interval]
+#
+# === Variables
+#
+# === Examples
+#
+# rsyslog::imfile { 'my-imfile':
+# file_name => '/some/file',
+# file_tag => 'mytag',
+# file_facility => 'myfacility',
+# }
+#
+define rsyslog::imfile(
+ $file_name,
+ $file_tag,
+ $file_facility,
+ $polling_interval = 10,
+ $file_severity = 'notice',
+ $run_file_monitor = true,
+ $persist_state_interval = 0,
+) {
+
+
+ include rsyslog
+ $extra_modules = $rsyslog::extra_modules
+
+ file { "${rsyslog::rsyslog_d}${name}.conf":
+ ensure => file,
+ owner => 'root',
+ group => $rsyslog::run_group,
+ content => template('rsyslog/imfile.erb'),
+ require => Class['rsyslog::install'],
+ notify => Class['rsyslog::service'],
+ }
+
+}