On 07.08.2018 22:30, Syed Jafar wrote:
Can someone please let me know what is wrong with my playbook (below)
formatting. I get the following error message when I run the playbook.

ERROR! 'copy' is not a valid attribute for a Play

The error appears to have been in '/etc/ansible/playbooks/copy_files.yml':
line 3, column 4, but may

be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
 - copy:
   ^ here

# Copy a new "test" file into place, backing up the original if it differs
from the copied version

---
 - copy:
     src: /etc/ansible/playbooks/cp.yml
     dest: /tmp
     owner: root
     group: root
     mode: 0644
     backup: no

This is not a playbook it's task.

A minimum required reading is
https://docs.ansible.com/ansible/2.6/user_guide/playbooks_intro.html

Preferably you should read the whole user guide
https://docs.ansible.com/ansible/2.6/user_guide/index.html

--
Kai Stian Olstad

--
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/16a0bfedd0bf17e12295fcdf75c31a11%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to