init
Some checks failed
Build And Test / build-and-push (push) Failing after 53s

This commit is contained in:
2024-12-13 17:12:03 +09:00
parent a27be94b19
commit ea11832a53
695 changed files with 71766 additions and 1 deletions

23
ansible_manager/models.py Normal file
View File

@ -0,0 +1,23 @@
from django.db import models
from django.conf import settings
class AnsibleJob(models.Model):
"""Ansible 작업 관리 모델"""
STATUS_CHOICES = [
('PENDING', 'Pending'),
('RUNNING', 'Running'),
('SUCCESS', 'Success'),
('FAILED', 'Failed'),
]
name = models.CharField(max_length=200)
playbook_content = models.TextField(help_text="Ansible Playbook YAML 내용")
inventory_content = models.TextField(help_text="Ansible Inventory 내용")
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='PENDING')
result = models.TextField(blank=True, null=True)
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
def __str__(self):
return self.name