Files
ansible_proxmox_VM/tasks/create-clones.yml

22 lines
683 B
YAML
Raw Normal View History

---
# create-clones.yml - Create and configure clones from template with error handling
- name: "[CLONES] Validate clone list is not empty"
2025-11-15 21:49:12 +01:00
ansible.builtin.fail:
msg: "No clones defined in 'clones' variable"
when:
- create_clones | default(false)
- clones is not defined or clones | length == 0
- name: "[CLONES] Process each clone"
include_tasks: clone_iteration.yml
vars:
clone: "{{ item }}"
loop: "{{ clones }}"
when: create_clones | default(false)
- name: "[CLONES] Skip clone creation (disabled)"
2025-11-15 21:49:12 +01:00
ansible.builtin.debug:
msg: " Clone creation is disabled. Set 'create_clones: true' to enable."
when: not (create_clones | default(false))