Closed pvoborni closed 3 years ago
base on PR: https://github.com/neoave/mrack/pull/36
This commit implements a MrackConfig which allows to define options and arguments otherwise needed in a configuration file and thus save people's time with writing them in CLI.
Config file looks like:
[mrack] mrackdb = config/mrackdb.yaml provisioning-config = config/provisioning-config.yaml metadata = config/metadata.yaml
Where each value is optional and existance of the config is also optional.
Mrack looks for the config on these locations:
It also changes CLI of commands:
With these changes it is possible to define a config file to allow just typing:
$ mrack up $ mrack list $ mrack ssh $ mrack output $ mrack destroy
The MrackConfig class is also extensible for new use cases.
Signed-off-by: Petr Vobornik pvoborni@redhat.com
base on PR: https://github.com/neoave/mrack/pull/36
This commit implements a MrackConfig which allows to define options and arguments otherwise needed in a configuration file and thus save people's time with writing them in CLI.
Config file looks like:
Where each value is optional and existance of the config is also optional.
Mrack looks for the config on these locations:
It also changes CLI of commands:
With these changes it is possible to define a config file to allow just typing:
The MrackConfig class is also extensible for new use cases.
Signed-off-by: Petr Vobornik pvoborni@redhat.com