-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support XDG configuration locations #1624
Comments
Hitlist here is basically:
|
LGTM! On the top of my head, if some variable substitution (i.e. |
Interesting, certainly possible but would need to think about it, the configuration system is pretty overloaded with features already :) I tend to solve that with project directories since your excellent |
Today for users the configuration we search down till we find a config, first one wins:
~/.choriarc
~/.mcollective
c:\programdata\choria\etc\client.conf
/etc/choria/client.conf
/usr/local/etc/choria/client.conf
/etc/puppetlabs/mcollective/client.cfg
We then merge:
choria.conf
in pwd and each ancestor directoryThis is pretty crazy, but things are about to get worse as we have to consider:
So we have to start thinking about data storage in client dirs etc
In linux world we have the XDG Base Directory Specification and I want to support this going forward as the way for user config.
So this means above list becomes:
~/.config/choria/choria.conf
C:\Users\username\AppData\Local
akaLocalAppData
or%LOCALAPPDATA%
c:\programdata\choria\etc\client.conf
/etc/choria/client.conf
/usr/local/etc/choria/client.conf
We then merge:
choria.conf
in pwd and each ancestor directoryI will support old ones a bit but start warning about them I think.
For caches for registry we would then use
XDG_CACHE_HOME
aka~/.cache/choria/registry
by default and on windowsLocalAppData\cache\choria\registry
.We can use the https://github.com/adrg/xdg package that includes the windows stuff as above.
Comments @smortex and @bastelfreak pls?
The text was updated successfully, but these errors were encountered: