Skip to content

Commit

Permalink
update dokumentation and service settings
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Nov 11, 2024
1 parent f7a6215 commit b5d0455
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 4 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
* [`Systemd::Capabilities`](#Systemd--Capabilities): Defines allowed capabilities
* [`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::LogLevel`](#Systemd--LogLevel): Defines allowed log levels
Expand Down Expand Up @@ -2732,7 +2732,7 @@ Alias of `Pattern['^[^/]+\.conf$']`

### <a name="Systemd--JournalRemoteSettings"></a>`Systemd::JournalRemoteSettings`

Matches Systemd journal remote config Struct
matches Systemd journal remote config Struct

Alias of

Expand All @@ -2752,7 +2752,7 @@ Struct[{

### <a name="Systemd--JournalUploadSettings"></a>`Systemd::JournalUploadSettings`

Matches Systemd journal upload config Struct
matches Systemd journal upload config Struct

Alias of

Expand Down
13 changes: 11 additions & 2 deletions manifests/journal_upload.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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}":
Expand Down
15 changes: 13 additions & 2 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,19 @@
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) }

Expand Down
2 changes: 1 addition & 1 deletion types/journalremotesettings.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Matches Systemd journal remote config Struct
# @summary matches Systemd journal remote config Struct
type Systemd::JournalRemoteSettings = Struct[
# lint:ignore:140chars
{
Expand Down
2 changes: 1 addition & 1 deletion types/journaluploadsettings.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Matches Systemd journal upload config Struct
# @summary matches Systemd journal upload config Struct
type Systemd::JournalUploadSettings = Struct[
# lint:ignore:140chars
{
Expand Down

0 comments on commit b5d0455

Please sign in to comment.