Commit Graph

6 Commits

Author SHA1 Message Date
patrick d5cf6f656e refactor(proxmox_lxc_provision): centralize module_defaults so tasks_from works without setup
Previously the community.proxmox.proxmox / proxmox_vm_info module_defaults
were defined inline on the outer block in main.yml. Invoking individual
task files via 'tasks_from: stop' (or delete/convert/etc.) bypassed
main.yml, leaving the API parameters unset and producing
'missing required arguments: api_host, api_user' errors. The README
worked around this by telling callers to repeat the module_defaults
block at the play level — easy to forget, and duplicated config.

Extract the defaults dict into _proxmox_module_defaults in
defaults/main.yml (using a YAML anchor to share between the two
modules), and wrap every task file that calls a Proxmox module in a
block that references it. Callers only need the proxmox_* connection
vars in scope (typically group_vars/all/) — both 'roles:' and
'tasks_from:' invocations now configure the API consistently.

Files wrapped: check-exists, create, clone, update, start, stop,
delete, convert. wait/post-clone/edit-config don't call Proxmox modules
and are unchanged. main.yml's now-redundant outer module_defaults is
removed.

README updated to drop the 'Using Standalone Tasks' workaround
boilerplate.
2026-06-28 13:42:41 -04:00
patrick 441b9fa824 refactor: Update check-exists.yml to check by vmid or hostname 2026-04-14 19:08:28 -04:00
patrick 6e6bed6a40 fix: change proxmox info module to proxmox_vm_info from proxmox_lxc_info 2026-04-14 17:52:24 -04:00
patrick 3a2b4b8775 chore: migrate proxmox module from community.general.proxmox to community.proxmox 2026-04-14 17:40:03 -04:00
patrick 479996612e refactor: use module_defaults for proxmox API connection
- Replace YAML merge keys (<<:) with module_defaults block in main.yml
- Simplify connection variables to individual vars instead of dictionary
- Remove redundant connection params from individual task files
- Document standalone task usage requires play-level module_defaults
- Update README examples with new variable pattern
2026-04-14 17:18:18 -04:00
patrick 62f4a3ea73 fix: rename roles to use underscores instead of hyphens which was causing the roles not to be found 2026-04-14 15:19:21 -04:00