'netconf_config' is not a valid attribute for a Play

Hi all, I am testing a very simple playbook for netconf and I didn’t get very far. What did I do wrong?

ERROR! ‘netconf_config’ is not a valid attribute for a Play

The error appears to have been in ‘/home/as2618/FSL/main.yaml’: line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • name: Add Netconf User
    ^ here

This is the content of the playbook:

xxxxx@ansi0003vm001:~/FSL$ cat -T main.yaml

  • name: Add Netconf User
    netconf_config:
    host: 192.168.0.100
    username: root
    password: hellothere
    xml: |
<?xml version="1.0" encoding="UTF-8"?> urn:ietf:params:netconf:base:1.0 urn:com:dingdong:ebase:1.1.0 ]]>]]>

Thanks!

That is not a playbook, I suggest reading the documentation and a good start is this one
https://docs.ansible.com/ansible/latest/playbooks_intro.html

I thought I am following the example of http://docs.ansible.com/ansible/latest/netconf_config_module.html.

Most module examples are 'specific tasks', they are supposed to be in
the context of a play and playbook.

If you are unclear on what that is, i suggest starting at
http://docs.ansible.com/ansible/latest/intro.html

Thanks all. If I understand the Playbook Intro correctly, I changed the playbook to

xxxxx@ansi0003vm001:~/FSL$ cat -T main.yaml