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
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
---
|
||||
- name: Stop container if it is running
|
||||
community.general.proxmox:
|
||||
<<: "{{ proxmox_api_connection }}"
|
||||
vmid: "{{ lxc_vmid | default(omit) }}"
|
||||
hostname: "{{ lxc_hostname | default(omit) }}"
|
||||
state: "stopped"
|
||||
state: stopped
|
||||
register: stop_result
|
||||
failed_when: |-
|
||||
stop_result.failed and
|
||||
|
||||
Reference in New Issue
Block a user