Showing with 115 additions and 134 deletions.
  1. +0 −3 .github/SECURITY.md
  2. +18 −18 .gitignore
  3. +1 −1 .msync.yml
  4. +32 −32 .pmtignore
  5. +13 −0 CHANGELOG.md
  6. +1 −2 Gemfile
  7. +29 −31 README.md
  8. +8 −7 REFERENCE.md
  9. +4 −32 Rakefile
  10. +5 −5 manifests/manage_unit.pp
  11. +2 −2 manifests/modules_load.pp
  12. +1 −1 metadata.json
  13. +1 −0 types/unit/service.pp
3 changes: 0 additions & 3 deletions .github/SECURITY.md

This file was deleted.

36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.4.0'
modulesync_config_version: '5.5.0'
64 changes: 32 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v4.2.0](https://github.com/voxpupuli/puppet-systemd/tree/v4.2.0) (2023-04-18)

[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/v4.1.0...v4.2.0)

**Implemented enhancements:**

- Add AmbientCapabilities to Systemd::Unit::Service [\#329](https://github.com/voxpupuli/puppet-systemd/pull/329) ([ekohl](https://github.com/ekohl))

**Merged pull requests:**

- Stick to the Puppet language style guide in examples [\#327](https://github.com/voxpupuli/puppet-systemd/pull/327) ([smortex](https://github.com/smortex))
- Fix `manage_unit` example in README.md [\#326](https://github.com/voxpupuli/puppet-systemd/pull/326) ([Enucatl](https://github.com/Enucatl))

## [v4.1.0](https://github.com/voxpupuli/puppet-systemd/tree/v4.1.0) (2023-03-31)

[Full Changelog](https://github.com/voxpupuli/puppet-systemd/compare/v4.0.1...v4.1.0)
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'voxpupuli-release', '~> 2.0', :require => false
end

gem 'rake', :require => false
Expand Down
60 changes: 29 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Let this module handle file creation.

```puppet
systemd::unit_file { 'foo.service':
source => "puppet:///modules/${module_name}/foo.service",
source => "puppet:///modules/${module_name}/foo.service",
}
~> service {'foo':
~> service { 'foo':
ensure => 'running',
}
```
Expand All @@ -44,7 +44,7 @@ file { '/usr/lib/systemd/system/foo.service':
mode => '0644',
source => "puppet:///modules/${module_name}/foo.service",
}
~> service {'foo':
~> service { 'foo':
ensure => 'running',
}
```
Expand All @@ -54,8 +54,8 @@ You can also use this module to more fully manage the new unit. This example dep
```puppet
systemd::unit_file { 'foo.service':
content => file("${module_name}/foo.service"),
enable => true,
active => true,
enable => true,
active => true,
}
```

Expand All @@ -65,18 +65,18 @@ Create a unit file from parameters

```puppet
systemd::manage_unit { 'myrunner.service':
$unit_entry => {
unit_entry => {
'Description' => 'My great service',
},
$service_entry => {
'Type' => 'oneshot',
service_entry => {
'Type' => 'oneshot',
'ExecStart' => '/usr/bin/doit.sh',
},
$install_entry => {
install_entry => {
'WantedBy' => 'multi-user.target',
},
enable => true,
active => true,
enable => true,
active => true,
}
```

Expand All @@ -94,8 +94,8 @@ systemd::dropin_file { 'foo.conf':
unit => 'foo.service',
source => "puppet:///modules/${module_name}/foo.conf",
}
~> service {'foo':
ensure => 'running',
~> service { 'foo':
ensure => 'running',
}
```

Expand All @@ -115,7 +115,7 @@ file { '/etc/systemd/system/foo.service.d/foo.conf':
mode => '0644',
source => "puppet:///modules/${module_name}/foo.conf",
}
~> service {'foo':
~> service { 'foo':
ensure => 'running',
}
```
Expand Down Expand Up @@ -150,7 +150,7 @@ Create a file entry for modules-loads directory and start
`systemd-modules-load.service`

```puppet
systemd::modules_load{'impi.conf':
systemd::modules_load { 'impi.conf':
content => "ipmi\n",
}
```
Expand Down Expand Up @@ -189,7 +189,7 @@ When `active` and `enable` are set to `true` the puppet service `runoften.timer`
declared, started and enabled.

```puppet
systemd::timer{'runoften.timer':
systemd::timer { 'runoften.timer':
timer_source => "puppet:///modules/${module_name}/runoften.timer",
service_source => "puppet:///modules/${module_name}/runoften.service",
active => true,
Expand All @@ -214,16 +214,15 @@ Type=oneshot
ExecStart=/usr/bin/touch /tmp/file
EOT
systemd::timer{'daily.timer':
systemd::timer { 'daily.timer':
timer_content => $_timer,
service_content => $_service,
}
service{'daily.timer':
service { 'daily.timer':
ensure => running,
subscribe => Systemd::Timer['daily.timer'],
}
```

If neither `service_content` or `service_source` are specified then no
Expand All @@ -245,8 +244,7 @@ Type=oneshot
ExecStart=/usr/bin/touch /tmp/file
EOT
systemd::timer{'daily.timer':
systemd::timer { 'daily.timer':
timer_content => $_timer,
service_unit => 'touch-me-today.service',
service_content => $_service,
Expand Down Expand Up @@ -296,7 +294,7 @@ needs to be restarted to apply the configs. The defined resource can do this
for you:

```puppet
systemd::network{'eth0.network':
systemd::network { 'eth0.network':
source => "puppet:///modules/${module_name}/eth0.network",
restart_service => true,
}
Expand All @@ -312,7 +310,7 @@ and `systemd-logind`
via the main class:

```puppet
class{'systemd':
class { 'systemd':
manage_resolved => true,
manage_networkd => true,
manage_timesyncd => true,
Expand All @@ -334,7 +332,7 @@ Systemd introduced `DNS Over TLS` in release 239. Currently three states are sup
Stopping `systemd-resolved` once running can be problematic and care should be taken.

```puppet
class{'systemd':
class { 'systemd':
manage_resolved => true,
resolved_ensure => false,
}
Expand All @@ -346,7 +344,7 @@ will stop the service and should also copy `/run/systemd/resolve/resolv.conf` to
It is possible to configure the default ntp servers in `/etc/systemd/timesyncd.conf`:

```puppet
class{'systemd':
class { 'systemd':
manage_timesyncd => true,
ntp_server => ['0.pool.ntp.org', '1.pool.ntp.org'],
fallback_ntp_server => ['2.pool.ntp.org', '3.pool.ntp.org'],
Expand All @@ -370,7 +368,7 @@ working accounting options per operating system, but you can still modify them
with `$accounting`:

```puppet
class{'systemd':
class { 'systemd':
manage_accounting => true,
accounting => {
'DefaultCPUAccounting' => 'yes',
Expand Down Expand Up @@ -400,8 +398,8 @@ Additionally you can set custom udev rules with the `udev_rules` parameter.
class { 'systemd':
manage_udevd => true,
udev_rules => {
'example_raw.rules' => {
'rules' => [
'example_raw.rules' => {
'rules' => [
'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"',
'ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"',
],
Expand Down Expand Up @@ -429,12 +427,12 @@ systemd::udev::rule:
The `systemd-oomd `system can be configured.

```puppet
class{'systemd':
class { 'systemd':
manage_oomd => true,
oomd_ensure => 'running'
oomd_settings => {
'SwapUsedLimit' => '90%',
'DefaultMemoryPressureLimit' => '60%',
'SwapUsedLimit' => '90%',
'DefaultMemoryPressureLimit' => '60%',
'DefaultMemoryPressureDurationSec' => 30,
}
}
Expand Down
15 changes: 8 additions & 7 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -931,15 +931,15 @@ Generate unit file from template
##### Generate a service

```puppet
systemd::manage_unit{ 'myrunner.service':
$unit_entry => {
systemd::manage_unit { 'myrunner.service':
unit_entry => {
'Description' => 'My great service',
},
$service_entry => {
'Type' => 'oneshot',
service_entry => {
'Type' => 'oneshot',
'ExecStart' => '/usr/bin/doit.sh',
},
$install_entry => {
install_entry => {
WantedBy => 'multi-user.target',
},
}
Expand Down Expand Up @@ -1111,15 +1111,15 @@ Creates a modules-load.d drop file
##### load a module

```puppet
systemd::modules_load{'impi.conf':
systemd::modules_load { 'impi.conf':
content => "ipmi\n",
}
```

##### override /lib/modules-load.d/myservice.conf in /etc/modules-load.d/myservice.conf

```puppet
systemd::modules_load{'myservice.conf':
systemd::modules_load { 'myservice.conf':
content => "# Cancel system version of the file\n",
}
```
Expand Down Expand Up @@ -2167,6 +2167,7 @@ Alias of

```puppet
Struct[{
Optional['AmbientCapabilities'] => Variant[Pattern[/^CAP_[A-Z_]+$/],Array[Pattern[/^CAP_[A-Z_]+$/],1]],
Optional['User'] => String[1],
Optional['Group'] => String[1],
Optional['Type'] => Enum['simple', 'exec', 'forking', 'oneshot', 'dbus', 'notify', 'idle'],
Expand Down
Loading