feat(awooop): enable controlled agent apply
Some checks failed
Code Review / ai-code-review (push) Successful in 16s
CD Pipeline / tests (push) Failing after 1m37s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-26 18:17:05 +08:00
parent c8912204ce
commit e7c368aa27
19 changed files with 1311 additions and 560 deletions

View File

@@ -613,9 +613,32 @@ class Settings(BaseSettings):
default=False,
description=(
"True=consume ansible_candidate_matched AOL rows and run "
"ansible-playbook --check --diff only. Apply remains disabled."
"ansible-playbook --check --diff before controlled apply."
),
)
ENABLE_AWOOOP_ANSIBLE_CONTROLLED_APPLY: bool = Field(
default=True,
description=(
"True=after a successful check-mode, allow AI Agent controlled Ansible "
"apply for allowlisted low/medium/high risk playbooks. Critical, "
"secret, destructive, data migration/restore/prune, reboot and node-drain "
"routes remain blocked by catalog and guardrails."
),
)
AWOOOP_ANSIBLE_CONTROLLED_APPLY_ALLOWED_RISK_LEVELS: str = Field(
default="low,medium,high",
description=(
"Comma-separated risk levels that AI Agent may apply after check-mode "
"passes. This implements owner direction that low/medium/high are "
"automated; critical stays break-glass only."
),
)
AWOOOP_ANSIBLE_CONTROLLED_APPLY_TIMEOUT_SECONDS: int = Field(
default=300,
ge=30,
le=900,
description="Timeout for one controlled ansible-playbook apply execution.",
)
AWOOOP_ANSIBLE_CHECK_MODE_INTERVAL_SECONDS: int = Field(
default=300,
ge=60,