-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use correctly /etc/sysconfig and /etc/default env defaults #50
Comments
Currently it is also impossible to override most of the vars in Line 15 in 9066a1f
In the smoke tests of the ansible-st2 playbook, essentially, we run:
Note that I don't think defining the variables with a bash default is sufficient, even though this it would allow overriding the variables from the command line: Line 1 in 9066a1f
That's not enough because it would make handling those settings through configuration management more error prone and problematic. We need a dedicated configuration file for system-specific settings that overrides the default settings in Please change the implementation of |
There are places for default env variables in different distro families:
/etc/sysconfig
- for Red Hat-like/etc/default
- for debian-likeWe support them in init files:
https://github.com/StackStorm/st2chatops/blob/master/debian/st2chatops.upstart#L24
https://github.com/StackStorm/st2chatops/blob/master/rpm/st2chatops.service#L10
So
st2chatops.env
should not overwrite env variable, if it was already passed.The good example is: https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env#L1
^^ Do that for every other env variable in
st2chatops.env
as a rule.Ideally, apart of editing existing
st2chatops.env
(sed
-like stuff is error-prone) user can just place his custom variables (good to do with Configuration Management tools) in/etc/sysconfig/st2chatops
or/etc/default/st2chatops
and be sure that they're used as a priority.The text was updated successfully, but these errors were encountered: