Running the Following Playbook syntax appears to be correct but getting following ERROR!

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

The error appears to have been in /root/playbook1.yml: line 2, column 3, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: insertupdate
  ^ here

My Playbook file code is:

- name: insertupdate
    dest: /etc/network/interfaces
    block: |
      iface eth2 inet static


Found the solution in the above Url, i am missing "tasks" in my play.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.