--- # 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))