Running the Following Playbook syntax appears to be correct but getting following ERROR!- ERROR! 'blockinfile' is not a valid attribute for a Play

25 views
Skip to first unread message

Karthik Veeragoni

unread,
Apr 7, 2016, 12:44:38 PM4/7/16
to Ansible Project
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

I am Using Ansible Version 2.x

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 



Reply all
Reply to author
Forward
0 new messages