diff --git a/app/models/ansible_models.py b/app/models/ansible_models.py index 63adc05e..5c1e8647 100644 --- a/app/models/ansible_models.py +++ b/app/models/ansible_models.py @@ -10,6 +10,7 @@ class AnsibleInstallNginx(BaseModel): @validator("os") def validator_os(cls, value): - if value not in ['ubuntu']: - raise ValueError("Size must be a valid string ending with 'Gi', 'Mi', or 'Ti'.") + valid_oss = ['ubuntu'] + if value not in valid_oss: + raise ValueError(f"your selected OS must be in {valid_oss}") return value \ No newline at end of file diff --git a/app/routes/ansible.py b/app/routes/ansible.py index 44816fcf..4c985c83 100644 --- a/app/routes/ansible.py +++ b/app/routes/ansible.py @@ -7,6 +7,7 @@ @app.post("/ansible-install/nginx/") async def ansible_install_generation_nginx(request:AnsibleInstallNginx) -> Output: + if os.environ.get("TEST"): return Output(output='output') generated_prompt = ansible_install_template(request,"nginx")