feat(ansible): add inventory_scope to AnsibleRun — 0017_ansible_run_scope migration

This commit is contained in:
2026-06-05 18:45:38 -04:00
parent fa32488fdf
commit 10df05c13e
2 changed files with 45 additions and 1 deletions
+4 -1
View File
@@ -19,7 +19,10 @@ class AnsibleRun(Base):
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
playbook_path: Mapped[str] = mapped_column(String(512), nullable=False)
inventory_path: Mapped[str] = mapped_column(String(512), nullable=False)
inventory_path: Mapped[str | None] = mapped_column(String(512), nullable=True)
inventory_scope: Mapped[str] = mapped_column(
String(255), nullable=False, default="steward:all"
)
source_name: Mapped[str] = mapped_column(String(128), nullable=False)
# Nullable: automated runs (alert actions, schedules) have no human actor —
# NULL renders as "system". Manual runs still record the triggering user.