[systemd-devel] Query regarding "EnvironmentFile"

Simon Peeters peeters.simon at gmail.com
Wed Dec 16 08:11:43 PST 2015


2015-12-16 9:47 GMT+00:00 Reindl Harald <h.reindl at thelounge.net>:
>
>
> Am 15.12.2015 um 18:59 schrieb Simon Peeters:
>>
>> 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
>
>
> "normal people" - what's wrong with you?

Nothing really, all systems both at my direct employer and those at
our customers run perfectly fine, and everything is automated, so in
our relatively small team we have more than enough time left to de
some R&D on future and upcoming tech.

>> and use configmanagement to put the
>> right apache config on the right host?
>
>
> because i know how to configure servers and don't need handholding tools
> since i develop my own admin backends for many years and services helping on
> repeatly needed taks but don't chain me to a limited subset of the supported
> options

If you want to use your home grown configmanagement tool, then learn
it to decently manage your apache config.

>> This whole "-D testserver" and "<IfDefine testserver>"  looks like an
>> ugly workaround for a lacking configmanagment system.
>
>
> config managements fpr webservers are ugly workaround for lacking knowledge
> and only fine for 08/15 setups but a no-go where you need flexibility

I think a lot of people disagree with you on that, including most of
the devops world.

>> More preciesly conf/local/testserver.conf probably shouldn't even
>> exist on non testing mahines
>
>
> guess why it's in the subfolder "local"
>
>> '/etc/…/testserver.conf': ensure => absent }" in puppet
>
>
> go away with that crap - only over my dead body besides Perl, PHP and Python
> now Ruby and it's dependencies would make it to any server here

Then use something else, like ansible, which is python, or cfengine,
or juju, or any other one in this list
https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software

My point being if you want to manage your apache config, manage your
apache config, intead of doing wierd workarounds with environment
variables and changing the ExecStart of your service.

In your case this is even flawed:
If the /etc/sysconfig/httpd file changes, then a systemctl reload
httpd wouldn't propagate the changes, while if you instead managed the
config directly it would.


More information about the systemd-devel mailing list