title: How to pass parameters to ansible uri module?
body: <p>I'm trying to do this in ansible</p>
  <pre><code>curl 'http://localhost:8080/user/admin/descriptorByName/jenkins.security.ApiTokenProperty/generateNewToken' --data 'newTokenName=adminToken' --user '{{ jenkins_admin_username }}:{{ jenkins_admin_password }}' -c cookies.txt
  </code></pre>
  <p>I'm not sure how to pass these values to uri module, using <code>ansible 2.9.6</code></p>
  <blockquote>
  <p>newTokenName=adminToken' --user {{ jenkins_admin_username }}:{{
  jenkins_admin_password }}</p>
  </blockquote>
  <pre><code>- name: get token
    uri:
      url: &quot;http://localhost:8080/user/admin/descriptorByName/jenkins.security.ApiTokenProperty/generateNewToken&quot;
      method: POST
      return_content: yes
      body: &quot;newTokenName=adminToken=user={{ jenkins_admin_username }}:{{ jenkins_admin_password }}&quot;
      headers:
        Cookie: &quot;{{ jenkins_crumb.set_cookie }}&quot;
  </code></pre>