proxmox-kube/ext/name-gen.py
2024-10-16 11:13:28 +02:00

11 lines
228 B
Python

from datetime import datetime
from json import dumps
from sys import argv
name = argv[1]
type = argv[2]
timestamp = datetime.now().strftime('%d.%m.%Y-%H:%M:%S')
name = f'{name}-{type}-{timestamp}'
print(dumps({'name': name}))