Ansible 기능 추가

This commit is contained in:
2025-05-21 01:08:10 +09:00
parent 69aca7ae85
commit ed5c62b1e5
10 changed files with 161 additions and 109 deletions

View File

@ -1,12 +1,16 @@
# ansible/models.py
from django.db import models
class AnsibleTask(models.Model):
name = models.CharField(max_length=200)
playbook_content = models.TextField() # ✅ YAML 문자열
inventory_content = models.TextField() # ✅ 인벤토리 형식 문자열
status = models.CharField(max_length=50, default='pending') # 'pending', 'running', 'success', 'failed', 'error'
output = models.TextField(blank=True) # ✅ 실행 결과 로그
author_email = models.CharField(max_length=150)
playbook_content = models.TextField()
inventory_content = models.TextField()
status = models.CharField(max_length=50, default='pending') # pending, running, success, failed, error
output = models.TextField(blank=True)
created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"{self.name} ({self.status})"
return f"{self.name} ({self.status})"