# Copyright (c) 2020, JINGROW
# See license.txt

from __future__ import annotations

import unittest
from typing import TYPE_CHECKING

import jingrow

if TYPE_CHECKING:
	from jingrow.types.DF import Data


def create_test_ansible_play(
	play: str = "",
	playbook: str = "",
	server_type: str = "Server",
	server: Data | None = "",
	vars: dict | None = None,
	status: str = "Success",
):
	if vars is None:
		vars = {}
	play = jingrow.get_pg(
		{
			"pagetype": "Ansible Play",
			"play": play,
			"playbook": playbook,
			"server_type": server_type,
			"server": server,
			"variable": vars,
		}
	).insert()
	play.db_set("status", status)
	play.reload()
	return play


class TestAnsiblePlay(unittest.TestCase):
	pass
