register not working for uri module

{“changed”: false, “msg”: "Unsupported parameters for (ansible.legacy.uri) module: register. Supported parameters include: ca_path, serole, client_key, use_proxy, setype, attributes (attr), force (thirsty), use_gssapi, force_basic_auth, seuser, src, validate_certs, client_cert, return_content, unix_socket, unsafe_writes, headers, url, creates, selevel, http_agent, mode, body, status_code, removes, method, remote_src, dest, url_password (password), url_username (user), timeout, group, body_format, follow_redirects,

this is the error I am getting
here is my playbook

— - name: make a curl call hosts: localhost become: true user: root gather_facts: no tasks: - name: Create Weekly Release Sequence ansible.builtin.uri: url: ‘https://google.com’ method: GET return_content: yes body_format: json register: result - debug: var: result.stdout no_log: False

Your issue is that the register is not part of the module, but of the task. Check your indentation.

Pull your “register:” to the left. It’s a task key word, so should line up with “name:” and “ansible.builtin.uri”, rather than with “url:”, “method:”, etc.

got it, thanks, never realized that