mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
- Split create-inventory logic into focused modules (cli, project, filters, host_vars, credentials, etc.) - Replace fragile path construction with python -m module execution - Add robust project root detection - Centralize password generation - Improve test coverage with per-module unit tests - Preserve existing inventory and host_vars behavior https://chatgpt.com/share/69471157-79c0-800f-8dec-25c0f8e38f03
10 lines
242 B
Python
10 lines
242 B
Python
from __future__ import annotations
|
|
|
|
import secrets
|
|
import string
|
|
|
|
|
|
def generate_random_password(length: int = 64) -> str:
|
|
alphabet = string.ascii_letters + string.digits
|
|
return "".join(secrets.choice(alphabet) for _ in range(length))
|