0

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
  blockinfile:
    dest: /etc/network/interfaces
    block: |
      iface eth2 inet static
          address 192.168.0.1
          netmask 255.255.255.0                           
1

https://stackoverflow.com/questions/36468870/running-the-following-playbook-syntax-appears-to-be-correct-but-getting-followin

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.