yaml.safe_load + safe_dump stripped every comment from inventory.yaml on each enrollment, eroding the file's documentation value. New _inventory_set_age_pubkey / _inventory_remove_host / _inventory_append_host helpers do line-based edits so comments outside the modified region survive. inventory.yaml gets its top-of-file conventions block back. build_host_files.py round-trips cleanly (--check returns 0). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8.7 KiB
8.7 KiB