{{ message }}
Introduce $CLUSTERSHELL_CFGDIR #483
Merged
Merged
Conversation
configuration files. Keep the default `/etc/clustershell` when the environment variable is not defined.
degremont
approved these changes
Aug 7, 2022
degremont
left a comment
Collaborator
There was a problem hiding this comment.
Just ensure the new variable name matches other possible variables we already support, if they exist. (CLUSTERSHELL_ prefix).
Collaborator
Author
thiell
approved these changes
Aug 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Introduce
$CLUSTERSHELL_CFGDIRas an alternate location for configuration files.This is basically a revisit of #191. This original issue led to #111, which allows per-user configuration file overrides, but doesn't provide a way to define system-wide configuration files (not per-user), which are not stored in
/etc.The use case is a multi-node cluster, where ClusterShell could be provided as a user-facing tool, installed on a shared file system (like a NFS mount point), and not as a local package on each node. In that case, providing system defaults for all users would requiring distributing configuration files on each and every of the cluster node's local
/etc/directory. A more flexible approach would be to define an environment variable (the proposed$CLUSTERSHELL_CFGDIR) to point to the global configuration directory, which could be co-located with the shared ClusterShell installation.When
$CLUSTERSHELL_CFGDIRis not defined, the default/etc/clustershellis used as a fallback to keep compatibility with existing configurations.This PR:
lib/ClusterShell/Defaults.pydoc/tests/CLIConfigTest.py