I am new to ansible getting error 

ansible-playbook -vvvv -i apphosts file.yml
ERROR: parse error: playbooks must be formatted as a YAML list, got <type 
'dict'>

 tasks:
  - name: Check that the somefile.conf exists
    stat: path=/etc/file.txt
    register: stat_result

  - name: Create the file, if it doesnt exist already
    file: path=/etc/file.txt state=touch
    when: stat_result.stat.exists == False

can any one please help me to sort this problem

-- 
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/451b2411-3e7f-47d9-ba42-b1f81843cff1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to