Closed qdii closed 6 months ago
The array form is explicitly tested in https://github.com/voxpupuli/puppet-systemd/blob/master/spec/defines/manage_unit_spec.rb#L41-L42
In your sample there is an error (extra ]
line 11)
Running this code
include systemd
systemd::manage_unit { 'remote-decrypt-containerd.service':
unit_entry => {
'Description' => 'Decrypts and unlock containerd',
},
service_entry => {
'Type' => 'simple',
'ExecStart' => 'remote-decrypt',
'Environment' => ['URL=https://foo.bar.com/key','DEVICE=/dev/nvme0n1p1','VOLUME_NAME=containerd'],
},
install_entry => {
'WantedBy' => 'multi-user.target',
},
}
Does produce this result:
# Deployed with puppet
#
[Unit]
Description=Decrypts and unlock containerd
[Service]
Type=simple
ExecStart=remote-decrypt
Environment=URL=https://foo.bar.com/key
Environment=DEVICE=/dev/nvme0n1p1
Environment=VOLUME_NAME=containerd
[Install]
WantedBy=multi-user.target
Please verify that you are actually using the correct module version, also you put the module version under Puppet
Ahh indeed I had version 4.2.0 installed. Once upgrading to 6.6.0 the syntax worked. Thanks!
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
The service file created as a result only contains one entry:
What behaviour did you expect instead
I'd expect to see 3
Environment=
linesAny additional information you'd like to impart
I also tried the following syntax, to no avail