L'exécution de la Suite de la Playbook de syntaxe semble correct mais l'obtention d'ERREUR suivant!- 'blockinfile" n'est pas un attribut valide que pour un Jeu

L'exécution de la Suite de la Playbook de syntaxe semble correct mais l'obtention d'ERREUR suivant!-

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

Mon Playbook fichier de code est:

---
- name: insertupdate
  blockinfile:
    dest: /etc/network/interfaces
    block: |
      iface eth2 inet static
          address 192.168.0.1
          netmask 255.255.255.0        

Par la façon dont je suis l'aide d'Ansible la Version 2.x

OriginalL'auteur Karthik Vee | 2016-04-07