Skip to content

Instantly share code, notes, and snippets.

View wtnb75's full-sized avatar

Watanabe Takashi wtnb75

  • IIJ
  • Kawasaki, Japan
View GitHub Profile
@wtnb75
wtnb75 / utminv.py
Created August 8, 2025 14:15
UTM to ansible dynamic inventory
#! /usr/bin/env python
import re
import json
import subprocess
def runcmd(cmd: list[str]):
return subprocess.run(["utmctl", *cmd], capture_output=True, encoding="utf-8")