Hi Team,

I am trying to unarchive a file is failing with below errors. Could someone 
please look into it.

*Playbook:*

---

- hosts: all

  vars_files:

      - /etc/ansible/xx/xyz/vars/main.yml

  tasks:

  - name: test

    unarchive:

      src: "{{ item.src_tar }}"

      dest: “{{ item.dest_tar }}”

    with_items: "{{ TAR }}"


*vars_files:*


TAR:

- { src_tar: '/home/virtual/xx/sample.tar.gz', dest_tar: '/tmp/sss/' }


*Error:*

"msg": "The task includes an option with an undefined variable. The error 
was: 'dict object' has no attribute 'dest_tar'\n\nThe error appears to have 
been in '/etc/ansible/xx/xyz/tasks/main.yml': line 23, column 5, but 
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n    with_items: \"{{ TAR }}\"\n  - name: 
test\n    ^ here\n"}

-- 
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/8c0daad1-841d-47a6-8322-a6a9f60e3eb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to