diff --git a/REFERENCE.md b/REFERENCE.md
index 9ba10833..6dc369d5 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -58,8 +58,8 @@
* [`Systemd::CoredumpSettings`](#Systemd--CoredumpSettings): Configurations for coredump.conf
* [`Systemd::Dropin`](#Systemd--Dropin): custom datatype that validates filenames/paths for valid systemd dropin files
-* [`Systemd::JournalRemoteSettings`](#Systemd--JournalRemoteSettings): Matches Systemd journal remote config Struct
-* [`Systemd::JournalUploadSettings`](#Systemd--JournalUploadSettings): Matches Systemd journal upload config Struct
+* [`Systemd::JournalRemoteSettings`](#Systemd--JournalRemoteSettings): matches Systemd journal remote config Struct
+* [`Systemd::JournalUploadSettings`](#Systemd--JournalUploadSettings): matches Systemd journal upload config Struct
* [`Systemd::JournaldSettings`](#Systemd--JournaldSettings): Matches Systemd journald config Struct
* [`Systemd::JournaldSettings::Ensure`](#Systemd--JournaldSettings--Ensure): defines allowed ensure states for systemd-journald settings
* [`Systemd::LogindSettings`](#Systemd--LogindSettings): Matches Systemd Login Manager Struct
@@ -2604,7 +2604,7 @@ Alias of `Pattern['^[^/]+\.conf$']`
### `Systemd::JournalRemoteSettings`
-Matches Systemd journal remote config Struct
+matches Systemd journal remote config Struct
Alias of
@@ -2624,7 +2624,7 @@ Struct[{
### `Systemd::JournalUploadSettings`
-Matches Systemd journal upload config Struct
+matches Systemd journal upload config Struct
Alias of
diff --git a/manifests/journal_upload.pp b/manifests/journal_upload.pp
index 117665e2..090584d0 100644
--- a/manifests/journal_upload.pp
+++ b/manifests/journal_upload.pp
@@ -5,8 +5,16 @@
# @param package_name
# name of the package to install for the functionality
#
+# @param service_ensure
+# what we ensure for the service
+#
+# @param service_enable
+# to enable the service
+#
class systemd::journal_upload (
- Optional[String[1]] $package_name = undef,
+ Optional[String[1]] $package_name = undef,
+ Enum['running','stopped'] $service_ensure = 'running',
+ Boolean $service_enable = true,
) {
assert_private()
@@ -15,7 +23,8 @@
}
service { 'systemd-journal-upload':
- ensure => running,
+ ensure => $service_ensure,
+ enable => $service_enable,
}
$systemd::journal_upload_settings.each |$option, $value| {
ini_setting { "journal-upload_${option}":
diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb
index 9ed6cabe..105d79d8 100644
--- a/spec/classes/init_spec.rb
+++ b/spec/classes/init_spec.rb
@@ -612,8 +612,17 @@
end
it { is_expected.to compile.with_all_deps }
- it { is_expected.to contain_service('systemd-journal-upload') }
- it { is_expected.to contain_service('systemd-journal-remote') }
+ it {
+ is_expected.to contain_service('systemd-journal-upload').with(
+ ensure: 'running',
+ enable: true
+ )
+ }
+ it {
+ is_expected.to contain_service('systemd-journal-remote').with(
+ ensure: 'running',
+ )
+ }
it { is_expected.to have_ini_setting_resource_count(8) }
diff --git a/types/journalremotesettings.pp b/types/journalremotesettings.pp
index 1648fa8f..80d5f492 100644
--- a/types/journalremotesettings.pp
+++ b/types/journalremotesettings.pp
@@ -1,4 +1,4 @@
-# Matches Systemd journal remote config Struct
+# @summary matches Systemd journal remote config Struct
type Systemd::JournalRemoteSettings = Struct[
# lint:ignore:140chars
{
diff --git a/types/journaluploadsettings.pp b/types/journaluploadsettings.pp
index 66ef297c..8ce6149b 100644
--- a/types/journaluploadsettings.pp
+++ b/types/journaluploadsettings.pp
@@ -1,4 +1,4 @@
-# Matches Systemd journal upload config Struct
+# @summary matches Systemd journal upload config Struct
type Systemd::JournalUploadSettings = Struct[
# lint:ignore:140chars
{