New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manage_unit service_entry Environment can't have multiple values #404
Comments
I too just ran into this issue |
I solved it this way:
not the nicest of all solutions but works and is readable enough. As the proper solution would be pretty easy to do as far as I can tell I would still like to see this fixed in this repo. |
Ha! Thanks for that workaround, I'll give it a try. And yes, a proper solution like puppet-systemd/types/unit/service.pp Line 94 in 3eccd13
- Optional['Environment'] => String,
+ Optional['Environment'] => Variant[String, Array[String]], should suffice I would say. I'd open a PR but I don't know how to write the tests for it 🤷🏻 |
It was previously impossible to set more than one environment variable: e.g. ```puppet systemd::manage_unit { 'test.service': unit_entry => { 'Description' => 'Bla', }, service_entry => { 'Type' => 'oneshot', 'Environment' => [ 'bla=foo', 'bar=bla', ], 'ExecStart' => '/usr/bin/true', }, enable => false, active => false, } ``` * Fixes voxpupuli#404
It was previously impossible to set more than one environment variable: e.g. ```puppet systemd::manage_unit { 'test.service': unit_entry => { 'Description' => 'Bla', }, service_entry => { 'Type' => 'oneshot', 'Environment' => [ 'bla=foo', 'bar=bla', ], 'ExecStart' => '/usr/bin/true', }, enable => false, active => false, } ``` * Fixes voxpupuli#404
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
An error during the puppet run (see output log)
What behaviour did you expect instead
A systemd service that contains multiple "Environment=" lines (Which is valid as per https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Environment)
Output log
The text was updated successfully, but these errors were encountered: