[systemd-devel] Query regarding "EnvironmentFile"
Simon Peeters
peeters.simon at gmail.com
Tue Dec 15 09:59:11 PST 2015
2015-12-10 15:20 GMT+00:00 Reindl Harald <h.reindl at thelounge.net>:
>
> Am 10.12.2015 um 15:46 schrieb Jóhann B. Guðmundsson:
>>
>> If you are unaware of any other use case for it
>
>
> EnvironmentFile=-/etc/sysconfig/httpd
> ExecStart=/usr/sbin/httpd $OPTIONS -D FOREGROUND
>
> [root at testserver:~]$ cat /etc/sysconfig/httpd
> OPTIONS="-D testserver"
>
> Apache:
> <IfDefine testserver>
> Include "conf/local/testserver.conf"
> </IfDefine>
>
> and now you can use the same systemd-unit on a dozens of machines and
> include specific config snippets WITOUT touch the systemd-unit or *anything*
> else in the apache configuration
>
>> perhaps it's time to
>> start looking into obsoleting it
>
>
> don't get me wrong but you sound once again like seek for changes to break
> users configuration to later blame users why they did not fix which ain't
> broken
Why not do like normal people and use configmanagement to put the
right apache config on the right host?
This whole "-D testserver" and "<IfDefine testserver>" looks like an
ugly workaround for a lacking configmanagment system.
More preciesly conf/local/testserver.conf probably shouldn't even
exist on non testing mahines. (a simple "file {
'/etc/…/testserver.conf': ensure => absent }" in puppet or "file:
path='/etc/…/testserver.conf' state=absent" in ansable)
If you have that you could probably even hardcode an
"IncludeOptional", though i still would advice against it, and just
conditionalize the line in your configmanagement (usinge lineinfile or
so.)
Greetings
Simon.
More information about the systemd-devel
mailing list