diff --git a/REFERENCE.md b/REFERENCE.md index 0e9397a1..15e1c69d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -2182,7 +2182,7 @@ Struct[{ Optional['OOMPolicy'] => Enum['continue', 'stop','kill'], Optional['OOMScoreAdjust'] => Integer[-1000,1000], Optional['Environment'] => String, - Optional['EnvironmentFile'] => Variant[Stdlib::Unixpath,Pattern[/-\/.*/]], + Optional['EnvironmentFile'] => Variant[Stdlib::Unixpath,Pattern[/-\/.+/], Array[Stdlib::Unixpath,Pattern[/-\/.+/],1]], }] ``` diff --git a/spec/type_aliases/systemd_unit_service_spec.rb b/spec/type_aliases/systemd_unit_service_spec.rb index d28db960..5234e514 100644 --- a/spec/type_aliases/systemd_unit_service_spec.rb +++ b/spec/type_aliases/systemd_unit_service_spec.rb @@ -19,5 +19,7 @@ it { is_expected.to allow_value({ 'EnvironmentFile' => '/etc/sysconfig/foo' }) } it { is_expected.to allow_value({ 'EnvironmentFile' => '-/etc/sysconfig/foo' }) } + it { is_expected.to allow_value({ 'EnvironmentFile' => ['/etc/sysconfig/foo', '-/etc/sysconfig/foo-bar'] }) } + it { is_expected.not_to allow_value({ 'EnvironmentFile' => '-/' }) } it { is_expected.not_to allow_value({ 'EnvironmentFile' => 'relative-path.sh' }) } end diff --git a/types/unit/service.pp b/types/unit/service.pp index f2f77c41..cf44720a 100644 --- a/types/unit/service.pp +++ b/types/unit/service.pp @@ -40,6 +40,6 @@ Optional['OOMPolicy'] => Enum['continue', 'stop','kill'], Optional['OOMScoreAdjust'] => Integer[-1000,1000], Optional['Environment'] => String, - Optional['EnvironmentFile'] => Variant[Stdlib::Unixpath,Pattern[/-\/.*/]], + Optional['EnvironmentFile'] => Variant[Stdlib::Unixpath,Pattern[/-\/.+/], Array[Stdlib::Unixpath,Pattern[/-\/.+/],1]], } ]