Ansilbe Usage

I tried running the following sample source code from http://stackoverflow.com/questions/39293527/ansible-uri-module-with-form

This is not a playbook, it's two tasks.

I highly recommend reading the documentation to get a basic knowledge of Ansible.

A great place to start is this one.
https://docs.ansible.com/ansible/playbooks_intro.html