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,7 +1,6 @@
|
||||
---
|
||||
- name: Create a full clone of the container
|
||||
community.general.proxmox:
|
||||
<<: "{{ proxmox_api_connection }}"
|
||||
vmid: "{{ lxc_vmid | default(0) }}"
|
||||
clone: "{{ lxc_clone_from }}"
|
||||
clone_type: "{{ lxc_clone_type }}"
|
||||
@@ -23,7 +22,7 @@
|
||||
become: yes
|
||||
register: resize_result
|
||||
changed_when: resize_result.rc == 0 and 'already at specified size' not in resize_result.stderr
|
||||
failed_when:
|
||||
failed_when:
|
||||
- resize_result.rc != 0
|
||||
- "'already at specified size' not in resize_result.stderr"
|
||||
when: lxc_size is defined
|
||||
|
||||
Reference in New Issue
Block a user