Files
ansible_proxmox_VM/tasks/create-clones.yml

22 lines
683 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
# create-clones.yml - Create and configure clones from template with error handling
- name: "[CLONES] Validate clone list is not empty"
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)"
ansible.builtin.debug:
msg: " Clone creation is disabled. Set 'create_clones: true' to enable."
when: not (create_clones | default(false))