mprov-ng / mprov_jobserver

The heart and soul of mProv. The mprov jobserver is the background work horse that handles all the heavy lifting.
Apache License 2.0
2 stars 1 forks source link

allow jobserver to take module list on the commandline. #40

Closed jhujasonw closed 2 years ago

jhujasonw commented 2 years ago

Would be nice to have a "enabled" directory with the config for enabling each module instead of having to modify the jobserver.yaml every time. This also enables scripting the enabling/disabling of modules more easily.

jhujasonw commented 2 years ago

Perhaps we can do something like this structure:

/etc/mprov/
        | --- jobserver/
                  |--- jobserver.yaml
                  |--- modules/
                  |--- modules.enabled/ (contains symlinks to ../modules/module.py
                  |--- modules.config/ (contains module.yaml files, only loaded if the module is enabled.)
jhujasonw commented 2 years ago

Another idea is to use a separate config file, ie for the script-runner and make the jobserver take an argument, like -m some,list,of,modules that overrides the modules listed in the main config. This argument would imply certain other args, like run-once, no register, perhaps others. This could be a better way to have a default config that is synced out for systems/system groups, but override it for certain things. Also, it would allow the job server to run one off tasks more easily, like if you wanted it to do something in a cron or if you wanted it to run something on command to re-sync the system's image in real time. It would be a different approach than the one mentioned above.