neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
11 stars 14 forks source link

Add mrack.conf which contains default enfironment #36

Closed Tiboris closed 3 years ago

Tiboris commented 3 years ago

Add mrack.conf from which we load defaults

Add mrack.conf which contains default enfironment configuration in ini format for the click options

Load default for options from the mrack.conf file from:

  1. use $(pwd)/mrack.conf or other way the ./mrack.conf - actual directory
  2. or use user home directory configuration - ~/.mrack/mrack.conf
  3. alternatively directory /etc/mrack/mrack.conf as safe fallback.

Add example mrack.conf and provisioning-config.yaml to the data/ directory in repository.

Update setup.py to install required files from data/ dir.

Signed-off-by: Tibor Dudlák tdudlak@redhat.com

pvoborni commented 3 years ago

The code seems to expect that the config will be placed in a system directory. This can be a possibility but it doesn't fulfill the original use case. The config file should be loaded from the directory where mrack is executed - in IdM CI terminology - the TWD. If it is not present then it will be ignored. Alternatively mrack can try other locations like ~/.config/mrack and the system one as a last option. In either case it should work without the file present.