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 Aug 14, 2024
1 parent 92caaba commit 914ff35
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
8 changes: 4 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2604,7 +2604,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 @@ -2624,7 +2624,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,

Check failure on line 17 in manifests/journal_upload.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

trailing whitespace found (check: trailing_whitespace)
) {
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
13 changes: 11 additions & 2 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

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 914ff35

Please sign in to comment.