Hi,

I am trying to create a role in which i have variable file ( main.yml) 
under vars folder containing 

---
 group1:
    cid: t1234
    env: uat
    status: active


and in the tasks (main.yml ) i have 
---
- name: setting values
  set_fact:
    cid: "{{item.cid}}"
    env : "{{item.env}}"
  with_items: "{{ group1}}"

  ****other lines*********

but when i run the ansible-playbook --syntax-check for task file i get the 
error 
 #ansible-playbook -syntax-check tasks/main.yml

*ERROR! 'with_items' is not a valid attribute for a Play*




*The offending line appears to be:---- name: setting values  ^ here*


Could you please let know where we are going wrong ,also if we can use 
set_fact with with_items or with_dict.






-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/823fa96e-1a50-43a0-9457-2356b5d89339%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to