Thank you for all the help, this is the output of the first task with 
-vvvvv when I try item.name

TASK [oraswgi-install : Copy installer files] 
*****************************************************************************************
task path: /root/MY_RAC/roles/oraswgi-install/tasks/main.yml:25
Read vars_file 'infra-vars.yml'
Read vars_file 'db-vars.yml'
Read vars_file 'secrets.yml'
fatal: [oradb1]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The 
error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no 
attribute 'name'\n\nThe error appears to have been in 
'/root/MY_RAC/roles/oraswgi-install/tasks/main.yml': line 25, column 3, but 
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n# ==> Copy installer files\n- name: Copy 
installer files\n  ^ here\n"
}
skipping: [oradb2] => (item=V978971-01.zip)  => {
    "changed": false,
    "item": "V978971-01.zip",
    "skip_reason": "Conditional result was False"
}
Read vars_file 'infra-vars.yml'
Read vars_file 'db-vars.yml'
Read vars_file 'secrets.yml'

The modified task is:
# ==> Copy installer files
- name: Copy installer files
  copy:
    src: '{{ item.name }}'
    dest: '{{ oracle_stage }}/'
    owner: '{{ grid_install_user }}'
    mode: 0644
    group: '{{ oracle_group }}'
  with_items: '{{ installer_archives }}'
  when: ansible_hostname==groups[group_names | first] | first

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9bcbc166-a594-43d2-99db-746b7140d97b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to