How to login to webpage using ansible ?

How to login to any webpage(having to log in ID and Password) and need to attach the file in the page(website page0 by using ansible. could you please help me with this

- name: Check url
  uri:
    url: https:www.facebook.com

- name: login check
  uri:
    url:https:www.facebook.com
    method: GET
    user: Admin
    password: admin
    force_basic_auth: yes
    status_code: 200
Here I used facebook as example could you please help me on this