diff --git a/manifests/unit_options.pp b/manifests/unit_options.pp index 1fb646b59e4ff4988b3d793514d1bc11c5ec3a87..5387c6527cc11f85b56bd9433bbac286c4f1adad 100644 --- a/manifests/unit_options.pp +++ b/manifests/unit_options.pp @@ -44,7 +44,7 @@ define systemd::unit_options( # reset that option to the empty list, as systemd would otherwise # just append the new value(s) to the existing list. # - $options, + $options=undef, # List of comment lines to add to the start of the parameter file. # The list may be nested, and individual "lines" are allowed to @@ -77,6 +77,10 @@ define systemd::unit_options( case $ensure { 'present': { + if ($options == undef) { + fail("Systemd::Unit_options[${title}]:", + "Parameter 'options' required when ensure = present") + } cfgfile::directory_parents { $filepath: top => $systemd::vars::etcdir,