Following environment variables can be set to configure validation script
-
max_workers
- Number of the concurrent Ansible Runner processes. Default: 2. -
host
- Bind socket to this host. Default:127.0.0.1
. -
port
- Bind to a socket with this port. Default: 8000. -
log_level
- Set the log level. Options arecritical
,error
,warning
,info
,debug
,trace
. Default:info
. -
reload
- Enable auto-reload when code was changed. This option should not be used in production due to additional resources consumption. Default: False. -
base_dir
- Base directory for thescripts_path
andartifacts_path
. Default: Absolute path tomain.py
. -
scripts_path
- Ansible Runner input directory. Default:<base_dir>/runtime-automation
-
artifacts_path
- Ansible Runner artifacts directory. Deafault:<base_dir>/artefacts
-
'jobs_path' - Validation scripts jobs data directory. Default:
<base_dir>/jobs
model_config = SettingsConfigDict(env_file=f'{base_dir}/.env')
Run the following command to start the validation script locally:
$ cd api $ python3 main.py
The .env
file can be used to set the environment variables.
Example:
BASE_DIR=/home/user/validation-scripts SCRIPTS_PATH=runtime-automation RELOAD=True